Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void PBR_float(float3 positionWS, half3 normalWS, half3 viewDirectionWS, half3 bakedGI, half3 albedo,
- half metallic, half3 specular, half smoothness, half occlusion, half3 emission, half alpha, out float3 Color)
- {
- #if defined(SHADERGRAPH_PREVIEW)
- Color = float3(1, 1, 1);
- #else
- InputData inputData;
- inputData.positionWS = positionWS;
- inputData.normalWS = NormalizeNormalPerPixel(normalWS);
- inputData.viewDirectionWS = SafeNormalize(-viewDirectionWS);
- inputData.shadowCoord = half4(0, 0, 0, 0);
- inputData.fogCoord = 0;
- inputData.vertexLighting = half3(0, 0, 0);
- inputData.normalizedScreenSpaceUV = half2(0, 0);
- inputData.shadowMask = half4(0, 0, 0, 0);
- inputData.bakedGI = bakedGI;
- Color = UniversalFragmentPBR(inputData, albedo, metallic, specular, smoothness, occlusion, emission, alpha);
- #endif
- }
- void PBR_half(half3 positionWS, half3 normalWS, half3 viewDirectionWS, half3 bakedGI, half3 albedo,
- half metallic, half3 specular, half smoothness, half occlusion, half3 emission, half alpha, out half3 Color)
- {
- #if defined(SHADERGRAPH_PREVIEW)
- Color = half3(1, 1, 1);
- #else
- InputData inputData;
- inputData.positionWS = positionWS;
- inputData.normalWS = NormalizeNormalPerPixel(normalWS);
- inputData.viewDirectionWS = SafeNormalize(-viewDirectionWS);
- inputData.shadowCoord = half4(0, 0, 0, 0);
- inputData.fogCoord = 0;
- inputData.vertexLighting = half3(0, 0, 0);
- inputData.normalizedScreenSpaceUV = half2(0, 0);
- inputData.shadowMask = half4(0, 0, 0, 0);
- inputData.bakedGI = bakedGI;
- Color = UniversalFragmentPBR(inputData, albedo, metallic, specular, smoothness, occlusion, emission, alpha);
- #endif
- }
- /*
- struct InputData
- {
- float3 positionWS;
- half3 normalWS;
- half3 viewDirectionWS;
- float4 shadowCoord;
- half fogCoord;
- half3 vertexLighting;
- half3 bakedGI;
- float2 normalizedScreenSpaceUV;
- half4 shadowMask;
- };
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement