Skip to content

Commit

Permalink
Fix shader compilation for R1
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed May 30, 2018
1 parent 3e4cf54 commit a1dbe79
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Layers/xrRender/ShaderResourceTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,14 @@ inline T* CResourceManager::CreateShader(const char* name, const bool searchForE

// Try to open
IReader* file = FS.r_open(cname);
if (!file)
{
// Cut last two chars and try again
// Needed for R1 vertex shaders
cname[xr_strlen(cname) - 2] = '\0';
file = FS.r_open(cname);
}

bool fallback = strstr(Core.Params, "-lack_of_shaders");
if (!file && fallback)
{
Expand Down

0 comments on commit a1dbe79

Please sign in to comment.