I currently have a R8G8B8 floating point render target and want to use it as a R24 target. The code
//cg
out = float4(v, v, v, v);
seems to clamp out between 0 and 1.
What’s the proper way to write/read to a floating point texture in Cg?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In OpenGL, you need to use a floating point texture format, such as R32F or RGBA32F. Then you won’t get clamping. I bet it’s the same in D3D.