• Content count

  • Joined

  • Last visited

  • Days Won


Nabroski last won the day on December 10 2016

Nabroski had the most liked content!

1 Follower

About Nabroski

  • Rank
    Advanced Member

Recent Profile Visitors

1,245 profile views
  1. 360 videos

    nice. yes, kind of hard to find. @Deltakosh idk. maybe the texture resolution, shouldn't be downscaled ? it looks good in browser, or get its downscaled becourse of missing html tag element ... exploring 1080p (for testing purposes only) you can also weird nummbers like { resolution: 512 } without a visibel effect (just saying) good work as always.
  2. FBO - 2d lighting?

    DumpFrameBuffer Just in case you miss it: found via playground search Those blocky edges you see in 512x512 Tex Resolution are Reptiles of the past. - Nostalgic, but yeah still fun.
  3. FBO - 2d lighting?

    So my theory is when you take a spotlight an flip the direction model - object - viewer position and project in back on a plane in a custom shader you can archive shadows actually a lot of work and then modify the source code to working for your needs. You test against meshes in 3d or 2d texture ? I think your Walls all defined by the Alpha Channel, let's see maybe i can t hack a simple Ray Tracer shadow map. ( I currently working maybe in 2 Weeks ) FBO is in Babylonjs a RendertargetTexture i think, otherwise DumptheFramebuffer never fails. For Shadow map you need also the enable Depth Test - some tutorial, forum post easy to find, but you always and in WebGL1 Mode ends up with 3 different shaders, and then still with blocky edges etc. proof of concept
  4. Best method to change pointer on hover

    maybe it's helpful
  5. Shader Loop Question

    "Now when I sample a tile I should get a return of [1/255, 0/255, 0/255, 1.0] " No if you want to test against r:1 you should do 255 /254 ~ 1.00390625 mediump - 10 bit, floating point range: -2^14 to 2^14, integer range: -2^10 to 2^10
  6. Shader Loop Question if (tile.x ==0.003 ? Also check if the AlphaBlending is On { needAlphaBlending: true, needAlphaTesting: true }
  7. Shader Loop Question

    So the only differenceis the extra blank space ? IDK maybe becourse some camera matrix computation is happening ? vec4 p = vec4( position, 1. ); // vPosition =; gl_Position = worldViewProjection * p; so the plane has a depth, babylonjs will also compute all the necessary steps befor it gets to |-1, 1 | coords of your screen, (maybe) it also lead to distortion
  8. Shader Loop Question

    (sorry, for three post in a row, their is kind of short cut that makes you submit ...weird) i'm also no genius here, change some numbers and see what the do, - the main challenge is to equally cut the frames 100/8 = 12.5(1 frame width) rows and 100/5=20(1 frame height) cells we are close
  9. Shader Loop Question

    @Pryme8 i press the enter key to early look at this pic x:y{0,0} is in the left-bottom x:y{1,1} how many frames[cel,rows] 8x4 = 32 length of one image = 4? (.25 ?) vuv / 4. + 100/8 rows = 12,5, - but i guess its smaller you have to figure it out @Pryme8 also this is not an 8rowsx8cells image so you have to cut the last cells (fract(vec2(_t, 3 - _t /FIVE OR LESS )/ALSOABITTRICKY)
  10. Shader Loop Question

    vuv = vector of two components {x , y} /4. the range for x = | 0 - 1 | the range for y = | 0 - 1 | vuv divided by four = 0,25 vuv / 4. + fract (implementation in glsl x-floor(x)) vector of two components {_t , 3 - _t / 4) }/ 4. mod(time,16) = time modulus operator 16 means is the number divisible by 16 ? yes return true : false return flase 3-mod(time,16)-4/4 means step 1 time slower then the x component in the vetcor 3-(mod(0.0)/4 when b = 0 = 0.75 again devide by four and so on{y,x}%2F4.)%2Bfract(({0..16,3-0..16%2F4})%2F4.),x%3D0..1.,y%3D0..1. float how many frames = 16 mod(time,how many frames) float length of one image = 4? so its equal divisible vuv / length of one image . + fract(vec2(_t, 3 - _t /length of one image ) / length of one image ));
  11. Shader Loop Question

    @Pryme8 Yes, i know. I was placing the #version derivative a second time ( it's already done by babylonjs ) becourse gl_FragColor in WebGL2.0 is deprecated and now is is able to have multiple outputs, so you can write directly from shader to shader etc. So my custom shader is compete with babylonjs the default material ( but im not sure about this ) Compatibility Mode Solution 1 (quick and dirty) #if __VERSION__ >= 300 Compatibility Mode Solution 2 Their a function i forgot like scene.StandartMaterial=null, or scene.hasDefaultMaterial(NO); Ok, so this is a webgl1.0 shader - when i done it right, should work
  12. Shader Loop Question

    OFFTOPIC @NasimiAsl "why you don't use Mod and floor" Whatever works, -works{x,y}%2F4.)%2Bfract(({0..16,3-0..16%2F4})%2F4.),x%3D0..1.,y%3D0..1.
  13. Shader Loop Question

    @Pryme8 "what If the number of frames is dynamic and they have different timings?" Yes, you need to make a grid[row,colums] and then Access the values. - different timings -> then will be calculated based on grid[row,colums] .length frame: 0 1 2 3 texPos: 0.2,.0.4,.0.8. 1.0 or -> firstpos 0.2 +firstpos 0.2 = frame 1 // prev.pos PLUS=MOVE TO NEXT POSTION float _t = sin(time);if(0.5<=_t)tile.xy += aTile.xy;if(0.25<=_t)tile.xy += aTile.xy; // NEXT POSTION ? if(aS>_t){ for(int i=0; i<maxFrames; i++){ aTile = texture2D(animationMap, aTile.xy); if(aTile.a == 0.0)break; aS = aTile.b; if(aS>_t){ tile.xy = aTile.xy; break; NasimiAsl vec2( mod( (p.x*4. ),1.)/4. /*take one column */ + _t * 0.25 /*move columns (t = frame )*/ ,p.y) + make a grid on a texture + specify a singel element(char) [width,height] + move the singel element position along the grid to get the next element :
  14. Shader Loop Question

    So i did a little shader, this is not what you are looking for ... so i would do everything in a singel shader test for color and the print the nummbers. i wrote some notes maybe you find something usefull
  15. @Sebavan can you also add more bits (ANGEL== RGBA8) to the, i'm into photography and the HDr looks a bit crunchy (chrome latest dev-build 64bit, firefox latest)