Default.bsl 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #include "$ENGINE$\BasePass.bslinc"
  2. Technique : base("Surface") =
  3. {
  4. Language = "HLSL11";
  5. Pass =
  6. {
  7. Fragment =
  8. {
  9. void main(
  10. in VStoFS input,
  11. out float4 OutGBufferA : SV_Target0,
  12. out float4 OutGBufferB : SV_Target1,
  13. out float2 OutGBufferC : SV_Target2)
  14. {
  15. SurfaceData surfaceData;
  16. surfaceData.albedo = float4(0.05f, 0.05f, 0.05f, 1.0f);
  17. surfaceData.worldNormal.xyz = input.tangentToWorldZ;
  18. surfaceData.roughness = 1.0f;
  19. surfaceData.metalness = 0.0f;
  20. encodeGBuffer(surfaceData, OutGBufferA, OutGBufferB, OutGBufferC);
  21. }
  22. };
  23. };
  24. };
  25. Technique : base("Surface") =
  26. {
  27. Language = "GLSL";
  28. Pass =
  29. {
  30. Fragment =
  31. {
  32. layout(location = 0) in vec2 uv0;
  33. layout(location = 2) in vec3 tangentToWorldZ;
  34. layout(location = 3) in vec4 tangentToWorldX;
  35. layout(location = 0) out vec4[3] fragColor;
  36. void main()
  37. {
  38. SurfaceData surfaceData;
  39. surfaceData.albedo = vec4(0.05f, 0.05f, 0.05f, 1.0f);
  40. surfaceData.worldNormal.xyz = tangentToWorldZ;
  41. surfaceData.roughness = 1.0f;
  42. surfaceData.metalness = 0.0f;
  43. encodeGBuffer(surfaceData, fragColor[0], fragColor[1], fragColor[2]);
  44. }
  45. };
  46. };
  47. };
  48. #include "$ENGINE$\Surface.bslinc"