3 registered members (NnamueN, Akow, 1 invisible),
1,421
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: suche projectionshader
[Re: TWO]
#120700
04/01/07 20:38
04/01/07 20:38
|
Joined: Jan 2007
Posts: 1,619 Germany
Scorpion
Serious User
|
Serious User
Joined: Jan 2007
Posts: 1,619
Germany
|
naja, vlt genau deswegen
edit: das ist asm..da kann ich nix zu sagen
Last edited by Scorpion; 04/01/07 20:39.
|
|
|
Re: suche projectionshader
[Re: Scorpion]
#120701
04/02/07 02:52
04/02/07 02:52
|
Joined: Sep 2002
Posts: 8,177 Netherlands
PHeMoX
Senior Expert
|
Senior Expert
Joined: Sep 2002
Posts: 8,177
Netherlands
|
Quote:
so weit ich weiß ist das mit gs nciht möglich... da muss man doch sowas wie "tracen" des kappt aber nicht
Doch, das kann gemacht werden mit 3dgs, unter anderem ChrisB hat glaube ich so etwas schon mal geschafft. Auch Rhuarc wenn ich's richtig habe hatte ein projection shader gemacht der funktioniert hat. Leider hat keiner ihren shader code veröffentlicht so weit ich weiss,
Code:
//---------------------------------------------------------------------
// ProjTex_VS
//---------------------------------------------------------------------
OutputVS ProjTex_VS(float4 pos : POSITION0,
float3 diffuse : COLOR0,
float2 tiledTexC : TEXCOORD0)
{
OutputVS outVS = (OutputVS)0;
outVS.pos = mul(pos, gWVP);
outVS.diffuse = diffuse;
outVS.tiledTexC = tiledTexC;
float3 vert2light = gSpotPos.xyz - pos; // vector from vertex to the light
float d = length(vert2light); // distance between the two, need this for attenuation
outVS.attenuation = 1 - (d / gSpotRange); // linear attenuation
outVS.attenuation = clamp(outVS.attenuation, 0, 1);
outVS.spotTexC = mul(pos, gLightMat);
outVS.decalTexC = mul(pos, gDecalMat);
return outVS;
} //---------------------------------------------------------------------
// ProjTex_PS
//---------------------------------------------------------------------
float4 ProjTex_PS(float3 diffuse : COLOR0,
float attenuation : COLOR1,
float2 tiledTexC : TEXCOORD0,
float4 spotTexC : TEXCOORD1,
float4 decalTexC : TEXCOORD2) : COLOR
{
float3 tile = tex2D(TiledTextureSampler, tiledTexC);
float3 spot = tex2D(SpotLightSampler, spotTexC);
float3 decal = tex2D(DecalSampler, decalTexC);
float3 final = tile * decal * (spot * 2 * attenuation + 0.1);
return float4(final, 1.0f);
}
I'm working on a projection shader too ..
Mfg,
|
|
|
Re: suche projectionshader
[Re: PHeMoX]
#120702
04/04/07 18:11
04/04/07 18:11
|
Joined: Mar 2007
Posts: 99 Germany
zSteam
OP
Junior Member
|
OP
Junior Member
Joined: Mar 2007
Posts: 99
Germany
|
ja soetwas wäre echt ein fortschritt... aber ich glaube in der sphere engine ist einer enthalten... oder wie sind denn da sonst die schatten auf den bäumen gelöst? edit: ich habe noch etwas gefunden, bei den ein projection shader zu einsatz kam: Projectionshaderund der von Alexander Esslinger, wäre genau der richtige ...kann es auch sein, das der shader nur mit der pro edition geht?
|
|
|
|