Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Categories
- All Discussions1,524
- General534
- Graphics109
- GPU Computing419
- Mobile141
- Pro Graphics163
- Tools158
Tags in this Discussion
- shader 30
- fx-composer 14
- hlsl 13
Help getting full screen effects to work in FX Composer 2.5
-
I've been messing with FXComposer 2.5 since it's way better then rendermonkey (although render monkey is somewhat easier to use.) and I've been trying to get screen quad effects to work in FXComposer but to no avail. So I thought I'd post my problem and see if ANYONE could help me figure this out as like I said: FXComposer is like 50 times better then RM. OK, so here goes:
/*
% Description of my shader.
% Second line of description for my shader.
keywords: material classic
date: YYMMDD
*/
#include <include\\Quad.fxh>
float4x4 WorldViewProj : WorldViewProjection;
float Script : STANDARDSGLOBAL
<
string UIWidget = "none";
string ScriptClass = "scene";
string ScriptOrder = "postprocess";
string ScriptOutput = "color";
string Script = "Technique=main";
> = 0.8;
float4 clearColor
<
string UIWidget = "Color";
string UIName = "Background";
> = { 1.0, 1.0, 1.0,1.0};
float clearDepth
<
string UIName = "Clear Depth";
string UIWidget = "none";
> = 1.0;
DECLARE_QUAD_TEX(gSceneTexture,gSceneSampler,"A8R8G8B8")
DECLARE_QUAD_DEPTH_BUFFER(DepthBuffer, "D24S8")
struct VS_OUT
{
float4 pos : POSITION0;
float2 tex : TEXCOORD0;
};
struct VS_IN
{
float4 pos : POSITION0;
float2 tex : TEXCOORD0;
};
float4 mainPS(QuadVertexOutput In,
uniform sampler2D sceneSamp,
uniform float4 color) : COLOR
{
float4 img = tex2D(sceneSamp,In.UV);
img.r = 1.0f;
return img;
}
technique main < string Script =
"RenderTarget0=gSceneTexture;"
"RenderDepthStencilTarget=DepthBuffer;"
"ClearSetColor=ClearColor;"
"ClearSetDepth=ClearDepth;"
"Clear=Color;"
"Clear=Depth;"
"ScriptExternal=Color;"
"Pass=main_pass_zero;";
> {
pass main_pass_zero < string Script =
"RenderColorTarget=0;"
"RenderDepthStencilTarget=;"
"Draw=Buffer;";
>
{
VertexShader = compile vs_3_0 ScreenQuadVS2(QuadTexelOffsets);
ZEnable = false;
ZWriteEnable = false;
AlphaBlendEnable = false;
CullMode = None;
PixelShader = compile ps_3_0 mainPS(gSceneSampler,float4(1,0,0,1));
}
}
ok, now, that's the shader, no for the errors i get when trying to Debug the Shader, Ok, well looks like the error isn't coming up but when I apply to shader to the scene it's like......all weird and stuff, like it's not clearing because i see an after affect. not sure what else to say.