Skip to content

Commit a1dbe79

Browse files
committed
Fix shader compilation for R1
1 parent 3e4cf54 commit a1dbe79

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Layers/xrRender/ShaderResourceTraits.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,14 @@ inline T* CResourceManager::CreateShader(const char* name, const bool searchForE
373373

374374
// Try to open
375375
IReader* file = FS.r_open(cname);
376+
if (!file)
377+
{
378+
// Cut last two chars and try again
379+
// Needed for R1 vertex shaders
380+
cname[xr_strlen(cname) - 2] = '\0';
381+
file = FS.r_open(cname);
382+
}
383+
376384
bool fallback = strstr(Core.Params, "-lack_of_shaders");
377385
if (!file && fallback)
378386
{

0 commit comments

Comments
 (0)