View Single Post
Old 07 January 2017, 19:29   #3
Registered User
rsn8887's Avatar
Join Date: Oct 2006
Location: USA
Posts: 771
I see. I realize there are also some post effect shaders in direct3d.cpp that are output as _winuae.fx. The file _winuae.fx can be used to override at least those without re-compiling direct3d.cpp. Excellent. Those seem to always be active.

And they give the "correct" picture.

So _winuae.fx, and presumably in Null Filter (are they the same?), you use the variable mtx for your WorldViewProjection.

In the user filters, the only semantic available for this is WORLDVIEWPROJECTION.

I have a hunch that they are not doing exactly the same, but it is just a hunch:

If I remove the projection from the vertex shader in _winuae.fx. I get a certain result. It is an Amiga screen that is too small. Note: I simply replaced the
Out.Position = mul(float4(pos, 1.0f), mtx);
Out.Position = float4(pos, 1.0f);

to remove any effect of mtx.

If I replace the equivalent projection
OUT.oPosition = mul(float4(pos, 1.0f), WorldViewProjection);
OUT.oPosition = float4(pos, 1.0f);
in my user "NULLTEST" shader, I get a different result (an Amiga screen that is about two times smaller again).

Is there any way to access "mtx" from within user shaders?
rsn8887 is offline  
Page generated in 0.12039 seconds with 9 queries