Getting Multiple Shader Buffer Textures
BlitzMax Forums/MiniB3D Module/Getting Multiple Shader Buffer Textures
| ||
If I need the CameraTex, DepthBufferToTex and NormalBufferToTex do I have to create multiple passes (camera) or can I include them in one pass? |
| ||
When using FBOs they take an extra render so camera/depthtotex need that just to get the data, normal maps are precalculated so you don't need to render anything and can do them in one pass, see the sl_bumpmap example for using normal maps. |
| ||
Thanks munch, I will have a look on the bump example. So the maximum to get those values would be just 2 pass? |
| ||
If you're doing a depth of field postfx shader that's a 2 pass, 1 for the camera and 1 for the depth on top of the normal render, there's no other way with realtime effects like that. The only time I used depthbuffertotex was for DOF but you could probably use it for fog or dark/light effects too. |
| ||
Thanks, I'll keep that in mind. Can you also get the normal map for the whole scene? like this one?![]() If I'm not mistaken the precalculated normal in the bump examples is per material, I hope this makes sense. |