New answers tagged fragment-shader
texelFetch is used for lockups without performing mip-mappnig, filtering..etc. and even with this you still need to pass a sampler. Otherwise your out of luck, as far as I am aware, making such operation available restricts driver writers from doing certain optimization, for instance they need to keep textures in a certain layout in memory.
First, from the picture it seems that in fact your light is not a "directional" light but a spotlight because you are using perspective projection, not an orthographic one (If not, then it is just the picture :) ). It is just a little thing, it should work more-or less the same. The important thing is, you don't render the positions from the light's point ...
Top 50 recent answers are included