Fix missing specular regression

This commit is contained in:
Wojciech Figat
2022-06-03 12:14:03 +02:00
parent d05c09a33d
commit 54c322da7c
3 changed files with 8 additions and 4 deletions

Binary file not shown.

View File

@@ -1,7 +1,7 @@
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
// Diffuse-only lighting
#define NO_SPECULAR
#define NO_SPECULAR 1
#include "./Flax/Common.hlsl"
#include "./Flax/Math.hlsl"

View File

@@ -5,6 +5,10 @@
#include "./Flax/LightingCommon.hlsl"
#ifndef NO_SPECULAR
#define NO_SPECULAR 0
#endif
ShadowData GetShadow(LightData lightData, GBufferSample gBuffer, float4 shadowMask)
{
ShadowData shadow;
@@ -24,7 +28,7 @@ LightingData StandardShading(GBufferSample gBuffer, float energy, float3 L, floa
LightingData lighting;
lighting.Diffuse = Diffuse_Lambert(diffuseColor);
#if defined(NO_SPECULAR)
#if NO_SPECULAR
lighting.Specular = 0;
#else
float3 specularColor = GetSpecularColor(gBuffer);