Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Float render target texture

4 views
Skip to first unread message

Scrat

unread,
Nov 23, 2009, 4:39:01 AM11/23/09
to
Dear all,

1) I am using floating point render target (R32F).
In my pixel shader, as output value, I write float4(value, X, X, X)
After rendering into my float render target, I lock it (note: Of
course, render texture are not lockable so I copy it into a system
memory texture) and read the result.

It looks like the value I read is not value, but X*value.
It means that I have to output, in my pixel shader : float4(value, 1,
1, 1)
If i write float4(value, 0, 0, 0), the value I read is 0.

Does it make sense? Is there any documentation that describes this?

2) Now I try to use G32R32F.
It looks more complicated, I don't understand.
In the pixel shader I write float4(10,2,0,0);
After locking, when reading the values, I get values R=5, and G=2
What is the rule behind this?

In advance, thank you for your help/explanations.
Scrat

Richard [Microsoft Direct3D MVP]

unread,
Nov 23, 2009, 7:53:40 AM11/23/09
to
[Please do not mail me a copy of your followup]

Do you get the same results on the REF device?
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

0 new messages