Pixel Shader for TEV stages
|
02-21-2013, 03:56 AM
What exactly is TEV? Google isn't turning up anything relevant. I assume it has something to do with textures.
"Normally if given a choice between doing something and nothing, I’d choose to do nothing. But I would do something if it helps someone else do nothing. I’d work all night if it meant nothing got done."
-Ron Swanson "I shall be a good politician, even if it kills me. Or if it kills anyone else for that matter. " -Mark Antony
TEV= Texture EnVironment
http://www.amnoid.de/gc/tev.html gives a fairly nice explanation of what you can do with it. EDIT: Another nice thing to read is http://www.codersnotes.com/notes/mario-refraction (really just for that one sentence about tev, bscly). 03-03-2013, 04:07 AM
I'm having a similar problem like this. When I try to load Twilight Princess (GC), I get this error message:
I'm running it on Dolphin 3.5 x86. I tried using the fix mentioned earlier in the thread, but it still gave me this same error. EDIT: My GPU is RS69OM. Here's the error dump: //Pixel Shader for TEV stages //3 TEV stages, 2 texgens, XXX IND stages uniform sampler2D samp0 : register(s0), samp1 : register(s1), samp2 : register(s2), samp3 : register(s3), samp4 : register(s4), samp5 : register(s5), samp6 : register(s6), samp7 : register(s7); uniform float4 color[4] : register(c0); uniform float4 k[4] : register(c4); uniform float4 alphaRef[1] : register(c8); uniform float4 texdim[8] : register(c9); uniform float4 czbias[2] : register(c17); uniform float4 cindscale[2] : register(c19); uniform float4 cindmtx[6] : register(c21); uniform float4 cfog[3] : register(c27); void main( out float4 ocol0 : COLOR0, in float4 rawpos : POSITION, in float4 colors_0 : COLOR0, in float4 colors_1 : COLOR1, in float3 uv0 : TEXCOORD0, in float3 uv1 : TEXCOORD1, in float4 clipPos : TEXCOORD2 ) { float4 c0 = color[1], c1 = color[2], c2 = color[3], prev = float4(0.0f, 0.0f, 0.0f, 0.0f), textemp = float4(0.0f, 0.0f, 0.0f, 0.0f), rastemp = float4(0.0f, 0.0f, 0.0f, 0.0f), konsttemp = float4(0.0f, 0.0f, 0.0f, 0.0f); float3 comp16 = float3(1.0f, 255.0f, 0.0f), comp24 = float3(1.0f, 255.0f, 255.0f*255.0f); float4 alphabump=float4(0.0f,0.0f,0.0f,0.0f); float3 tevcoord=float3(0.0f, 0.0f, 0.0f); float2 wrappedcoord=float2(0.0f,0.0f), tempcoord=float2(0.0f,0.0f); float4 cc0=float4(0.0f,0.0f,0.0f,0.0f), cc1=float4(0.0f,0.0f,0.0f,0.0f); float4 cc2=float4(0.0f,0.0f,0.0f,0.0f), cprev=float4(0.0f,0.0f,0.0f,0.0f); float4 crastemp=float4(0.0f,0.0f,0.0f,0.0f),ckonsttemp=float4(0.0f,0.0f,0.0f,0.0f); clipPos = float4(rawpos.x, rawpos.y, clipPos.z, clipPos.w); uv0.xy = uv0.xy * texdim[0].zw; if (uv1.z) uv1.xy = uv1.xy / uv1.z; uv1.xy = uv1.xy * texdim[1].zw; // TEV stage 0 rastemp = colors_0.rgba; crastemp = frac(rastemp * (255.0f/256.0f)) * (256.0f/255.0f); tevcoord.xy = uv0.xy; textemp=tex2D(samp0,tevcoord.xy * texdim[0].xy).rgba; // color combine prev.rgb = saturate((textemp.rgb)*(crastemp.rgb)); // alpha combine prev.a = saturate(crastemp.a*textemp.a); // TEV done // TEV stage 1 tevcoord.xy = uv1.xy; textemp=tex2D(samp1,tevcoord.xy * texdim[1].xy).rgba; konsttemp = float4(k[1].rrr, k[0].a); ckonsttemp = frac(konsttemp * (255.0f/256.0f)) * (256.0f/255.0f); // color combine c2.rgb = saturate((textemp.rgb)+float3(1.0f, 1.0f, 1.0f)*(ckonsttemp.rgb)); // alpha combine prev.a = prev.a+float4(0.0f, 0.0f, 0.0f, 0.0f).a; // TEV done // TEV stage 2 textemp = float4(1.0f, 1.0f, 1.0f, 1.0f); konsttemp = float4(k[0].rgb, k[3].a); ckonsttemp = frac(konsttemp * (255.0f/256.0f)) * (256.0f/255.0f); cprev = frac(prev * (255.0f/256.0f)) * (256.0f/255.0f); cc2 = frac(c2 * (255.0f/256.0f)) * (256.0f/255.0f); // color combine prev.rgb = saturate(4.0f*((c0.rgb)+lerp((ckonsttemp.rgb), (cc2.rgb), (cprev.rgb)))); // alpha combine prev.a = ckonsttemp.a*cprev.a; // TEV done prev = frac(prev * (255.0f/256.0f)) * (256.0f/255.0f); float zCoord = czbias[1].x + (clipPos.z / clipPos.w) * czbias[1].y; float ze = cfog[1].x / (cfog[1].y - (zCoord / cfog[1].w)); float x_adjust = (2.0f * (clipPos.x / cfog[2].y)) - 1.0f - cfog[2].x; x_adjust = sqrt(x_adjust * x_adjust + cfog[2].z * cfog[2].z) / cfog[2].z; ze *= x_adjust; float fog = saturate(ze - cfog[1].z); prev.rgb = lerp(prev.rgb,cfog[0].rgb,fog); ocol0 = prev; } 03-03-2013, 04:31 AM
The answer is in the error message: your GPU is too old.
Btw your CPU is too weak for Dolphin
[color=#ff0000][color=#006600]i5 3570K @ 4.5GHz/GTX 660 Ti/RAM 4GB/Win7 x64[/color][/color]
03-03-2013, 04:34 AM
*cue Darth Vader's NOOOOOOOOOOOOOOOOOOOOOOOOO*
How is it too weak? I can run games like Team Fortress 2 and Minecraft pretty well (albeit laggy at times, but mostly it's not that bad). Is there a way to update my GPU? (03-03-2013, 04:34 AM)TheZunar123 Wrote: How is it too weak? I can run games like Team Fortress 2 and Minecraft pretty well (albeit laggy at times, but mostly it's not that bad).Team Fortress 2 and Minecraft aren't Dolphin. Read the FAQ. 03-03-2013, 04:38 AM
Curse my CPU for being too old. Then again, it's a laptop, so I can't expect much.
Thanks for the help. |
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)