Skip to content

Commit

Permalink
fix(VR): fix white items with PBR enabled (#907)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlayaN authored Jan 20, 2025
1 parent 2aa65c1 commit 349ec42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.21)

project(
CommunityShaders
VERSION 1.1.12
VERSION 1.1.13
LANGUAGES CXX
)

Expand Down
6 changes: 5 additions & 1 deletion package/Shaders/Lighting.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -2442,7 +2442,11 @@ PS_OUTPUT main(PS_INPUT input, bool frontFace
indirectDiffuseLobeWeight *= vertexColor;
# endif

color.xyz += emitColor.xyz;
// Fixes white items in UI for VR
[branch] if ((PBRFlags & PBR::Flags::HasEmissive) != 0)
{
color.xyz += emitColor.xyz;
}
color.xyz += transmissionColor;
# else
color.xyz += diffuseColor * baseColor.xyz;
Expand Down
2 changes: 1 addition & 1 deletion src/ShaderCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <unordered_map>
#include <unordered_set>

static constexpr REL::Version SHADER_CACHE_VERSION = { 0, 0, 0, 25 };
static constexpr REL::Version SHADER_CACHE_VERSION = { 0, 0, 0, 26 };

using namespace std::chrono;

Expand Down

0 comments on commit 349ec42

Please sign in to comment.