FuRanKi
2006-08-02, 12:56:44
Hallo Zusammen,
ich versuche mich gerade mit HLSL-Shadern und stoße gerade auf ein kleines Syntaxproblem.
Wie kann ich diese "If < "-Abfrage richtig coden?
Also d.h. ich kann die col.rgb-Werte nicht auf niedrigere Werte abfragen.
Das geht doch sicher irgendwie.
Vielen Dank
FuRanKu
---------------------------
float4 psThreshold(vs2ps In): COLOR
{
float LowT = LowThreshold * (1/255);
float3 LT = {0.5f, 0.5f, 0.5f};
float4 col = tex2D(Samp, In.TexCd);
if (col.rgb < LowT)
col.rgb = 0;
else
col.rgb = 1;
return col;
}
-------------------
ich versuche mich gerade mit HLSL-Shadern und stoße gerade auf ein kleines Syntaxproblem.
Wie kann ich diese "If < "-Abfrage richtig coden?
Also d.h. ich kann die col.rgb-Werte nicht auf niedrigere Werte abfragen.
Das geht doch sicher irgendwie.
Vielen Dank
FuRanKu
---------------------------
float4 psThreshold(vs2ps In): COLOR
{
float LowT = LowThreshold * (1/255);
float3 LT = {0.5f, 0.5f, 0.5f};
float4 col = tex2D(Samp, In.TexCd);
if (col.rgb < LowT)
col.rgb = 0;
else
col.rgb = 1;
return col;
}
-------------------