floooh / voxel-test

Place to experiment with stb_voxel_renderer.h and Oryol
MIT License
5 stars 1 forks source link

fog shader update #8

Open mgerhardy opened 8 years ago

floooh commented 8 years ago

I can't merge this one since it depends on gl_FragCoord, this exists only on GL :)

mgerhardy commented 8 years ago

doesn't matter - then let's just leave it here for reference - might help others. We will try to extract the AO shader from the next pull request, then

floooh commented 8 years ago

...actually I just remembered, I've created a wrapper macro that should work called '_fragcoord', which then gets translated to gl_FragCoord, or SV_Position (HLSL) or [position].

It's used in the Paclone and GPUParticle sample shaders, so it should work.

mgerhardy commented 8 years ago

updated the patch to use _fragcoord. Works fine here. Thanks