Original Post
Hi there,
i want to use light effects on an object which vertex positions are changed by a height map,
but after the displacement the normals - which i need for lights - are corrupt...
My first approach was to calculate the normals once on the CPU side before rendering, but that's not very fast cause i have to do all the texture mapping, height mapping etc with the cpu... what is equal to software rendering
Furthermore dynamical animations aren't possible with it.
So i want to calculate the normals in realtime in the shaders... does anyone have an idea how to do this with Open GL ES 2.0?
I found this:
http://www.catalinzi...to-normal-maps/
but i don't understand what he means with putting the "result into a render target"
or how such a pixel shader could look like by only having access to one pixel
or how to run this pre-calculation before rendering the actual object...
Also it's HLSL...
Please help me
i want to use light effects on an object which vertex positions are changed by a height map,
but after the displacement the normals - which i need for lights - are corrupt...
My first approach was to calculate the normals once on the CPU side before rendering, but that's not very fast cause i have to do all the texture mapping, height mapping etc with the cpu... what is equal to software rendering
Furthermore dynamical animations aren't possible with it.
So i want to calculate the normals in realtime in the shaders... does anyone have an idea how to do this with Open GL ES 2.0?
I found this:
http://www.catalinzi...to-normal-maps/
but i don't understand what he means with putting the "result into a render target"
or how such a pixel shader could look like by only having access to one pixel
or how to run this pre-calculation before rendering the actual object...
Also it's HLSL...
Please help me