Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void PBR_float(float3 positionWS, half3 normalWS, half3 normalTS, half3 viewDirectionWS, half3 bakedGI, half3 albedo,
- half metallic, half3 specular, half smoothness, half occlusion, half3 emission, half alpha, half clearCoatMask, half clearCoatSmoothness, 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;
- SurfaceData surfData;
- surfData.albedo = albedo;
- surfData.specular = specular;
- surfData.metallic = metallic;
- surfData.smoothness = smoothness;
- surfData.normalTS = normalTS;
- surfData.emission = emission;
- surfData.occlusion = occlusion;
- surfData.alpha = alpha;
- surfData.clearCoatMask = clearCoatMask;
- surfData.clearCoatSmoothness = clearCoatSmoothness;
- Color = UniversalFragmentPBR(inputData, surfData);
- #endif
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement