Thanks, this is very helpfull!
Type: Posts; User: STTrife
Thanks, this is very helpfull!
I wonder why you would want your own rasterization . I do think it would be cool to do ray tracing with 'real' ambient occlusion algorithms on the fragment shaders, by defining your inworld objects...
Thanks, this is very clear, now my next question would be, how would you find the point of origin of a camera ray in orthogonal projection? I assume you'd have to use the gl_FragCoord somehow???
Hi I was wondering: in a shader I'm writing I'm assuming that the 'ray' that I construct from the camera to to the fragment starts at 0,0,0 and goes trough the eyespace position of the fragment....
Ahh i understand now, thank you very much! I though it would always read 4 values per texel.
Hi there,
I wanted to use a texture/buffer to access my heightfield on my vertex shader. However, the heights are floats and it seems like all methods that sample 2dtextures return vec4, which has...
Thanks, this is helpful in several ways. I used dfDx and dfDy in the frament shader to compute the triangle normals, but now I also understand where these functions come from. Also the advice on...
what derivatives are you referring to, what are they used for (just out of curiosity) ?
Thanks! I was thinking that if is was only called for each pixels on the screen then it wouldn't depend much on the number of triangles drawn, but I'll assume it does depend on that now for speed...
I really thought this tutorial was useful when I started without any knowledge of shaders:
http://www.lighthouse3d.com/opengl/glsl/
I was wondering how often you can say a fragment shader is run...
Can you say that only 1 fragment shader is called for each pixel on the screen? Or is it run for each pixel in each triangle that is...
Thanks a lot, that was the answer was hoping for! I am working from scratch and i do prefer my own type of lights, so i'll just pass my own lights then.
Hi there,
Quick question: if you are writing a custom shader for lighting, it is still useful (faster) to use the build in lights from openGL, or might I just as wel use my own array of lights? I...
Thanks for pointing that out! I was looking at it and found the following discussion, which seems to answer my question. Seems it is possible to calculate the face normals in a a fragment shader so...
yes I mean they have to be flat looking... I'm going for terrain-look like simcity 2000, but then in 3d..
But I CAN get flat looking faces use gouraud shading, as long as I point all the...
Hi there,
For a project I have a terrain (height map), for which I preferably would only like to use 1 vertex per height point, but the problem is that I would like to have hard edges. If I use...