Default.bsl 1.2 KB

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