So,
as I´m porting sort of a volume shader from hlsl to glsl, can someone maybe help me with this line here.
Where ray-origin (ro) and ray-dir (dir) are vec3 coords → kinda clear in raymarching, but,
how to get this tex3D ported to glsl?
ro += (dir * 0.1) * tex3D(t2, uv.xyx * 100.0) * 10.0;
Thanks
b
Seems it has to be just texture( _your_texture_uniform_, vec3( _some_values_ ) );
Like here: three.js/VolumeShader.js at e1ead8c5c2eb2395942f5e7d9af7240befc5d729 · mrdoob/three.js · GitHub
ro += (dir * 0.1) * texture(t2, uv.xyx * 100.0) * 10.0;
Reference: three.js examples
Thanks @prisoner849
this is what I got so far…
Strangly it looks ok but I´m sure I´m far away from doing good…
And even more - darn far away of what I wanted to achieve
GHP - PROG-RAHAM (scroll down to headline/post ao volume texture (2011/11/14)) → the zip-files there have the sources (main.fx)
I think I came pretty closer in this one: