Skip to content

Commit

Permalink
Couple shader things
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaDesigns committed Jan 4, 2024
1 parent 92bbc34 commit ea23667
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Tiger/Schema/Shaders/S2ShaderConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -634,14 +634,15 @@ private StringBuilder ConvertInstructions(IMaterial material, bool isVertexShade
{
case 10: //Depth
bUsesDepthBuffer = true;
funcDef.AppendLine($"\t\t{equal.TrimStart()}= Depth::Get({sampleUv}).{dotAfter} //{equal_post}");
funcDef.AppendLine($"\t\t{equal.TrimStart()}= Depth::Get({sampleUv}).xxxx; //{equal_post}");
break;
case 11:
case 13:
case 23: //Usually uses SampleLevel but shouldnt be an issue?
bUsesFrameBuffer = true;
funcDef.AppendLine($"\t\t{equal.TrimStart()}= g_tFrameBufferCopyTexture.Sample(s_s{sampleIndex}, {sampleUv}).{dotAfter} //{equal_post}");
break;
case 15:
case 20:
funcDef.AppendLine($"\t\t{equal.TrimStart()}= float4(0.3137,0.3137,0.3137,0.3137).{dotAfter} //{equal_post}");
break;
Expand All @@ -650,7 +651,7 @@ private StringBuilder ConvertInstructions(IMaterial material, bool isVertexShade
funcDef.AppendLine($"\t\t{equal.TrimStart()}= float4(0.1882,0.1882,0.1882,0.1882).{dotAfter} //{equal_post}");
break;
default:
funcDef.AppendLine($"\t\t{equal.TrimStart()}= float4(1,1,1,1).{dotAfter} //{equal_post}");
funcDef.AppendLine($"\t\t{equal.TrimStart()}= float4(0.5,0.5,0.5,0.5).{dotAfter} //{equal_post}");
break;
}
}
Expand Down Expand Up @@ -686,14 +687,15 @@ private StringBuilder ConvertInstructions(IMaterial material, bool isVertexShade
break;
case 10:
bUsesDepthBuffer = true;
funcDef.AppendLine($"\t\t{equal.TrimStart()}= Depth::Get({sampleUv}).{dotAfter} //{equal_post}");
funcDef.AppendLine($"\t\t{equal.TrimStart()}= Depth::Get({sampleUv}).xxxx; //{equal_post}");
break;
case 11:
case 13:
case 23: //Usually uses SampleLevel but shouldnt be an issue?
bUsesFrameBuffer = true;
funcDef.AppendLine($"\t\t{equal.TrimStart()}= g_tFrameBufferCopyTexture.Load({sampleUv}).{dotAfter} //{equal_post}");
break;
case 15:
case 20:
funcDef.AppendLine($"\t\t{equal.TrimStart()}= float4(0.3137,0.3137,0.3137,0.3137).{dotAfter} //{equal_post}");
break;
Expand All @@ -702,7 +704,7 @@ private StringBuilder ConvertInstructions(IMaterial material, bool isVertexShade
funcDef.AppendLine($"\t\t{equal.TrimStart()}= float4(0.1882,0.1882,0.1882,0.1882).{dotAfter} //{equal_post}");
break;
default:
funcDef.AppendLine($"\t\t{equal.TrimStart()}= float4(1,1,1,1).{dotAfter} //{equal_post}");
funcDef.AppendLine($"\t\t{equal.TrimStart()}= float4(0.5,0.5,0.5,0.5).{dotAfter} //{equal_post}");
break;
}
}
Expand Down

0 comments on commit ea23667

Please sign in to comment.