Can't load CRT-royale

When I load the crt-royale (GLSL) preset, nothing changes. The previously loaded shader stays active. Updating the shaders from the content updater doesn’t help. It seems that I have broken something because I’m almost sure that it loaded correctly before.

I’m on Win10 using Retroarch 1.7.0 and the gl driver.

Can you post a log of you trying to load the shader?

Hmm, works fine here. What GPU do you have?

Can you try opening the preset and knocking the number of passes down from “12” to “11”? If that loads, then it’s the last pass that’s causing problems and I’m suspicious of a certain line in that pass where it’s casting a vec4 to a mat2x2.

Radeon HD5870

With 11 passes it loads (the screen stays black though).

ok, can you try opening crt/shaders/crt-royale/src/crt-royale-geometry-aa-last-pass.glsl in a text editor, scroll down to line 3747 and just delete the word ‘float4’? That is, make the line look like this:

float2x2(pixel_to_tex_uv * aa_pixel_diameter);

Doesn’t help. New log file with same error:

Edit: there are 11 remaining occurrences of that cast. Would you have a regex for Notepad++ that replaces them all? I’ll look into it tomorrow.

Yeah, you should be able to copy that entire line and then just remove the ‘float4’ and then ‘replace all’. Those shaders are all super-redundant because GLSL doesn’t support #includes, so I had to just copy/paste everything into the file, and I was too lazy to determine whether each thing had already been pasted in…

It works, thanks hunterk. I wonder if there is any impact performance-wise.

no, it should be the same. I’ll apply the fix in the repo. thanks for testing!

Where is user-settings.h and the crt-royale-settings-files folder for glsl ? I only have them in the cg and slang folders.

They’re typically #included but since GLSL doesn’t support that, I had to hardcode the user-settings file into the shaders.

1 Like

Hi hunterk, after installing 1.7.1 I’ve updated the shaders and noticed crt-royale didn’t load; a cast to float4 remains at line 5285 in crt/shaders/crt-royale/src/crt-royale-geometry-aa-last-pass.glsl. I’ve removed it on my side and it works fine.

Ah, thanks for the heads-up. I think it should be good now.

It seems you removed the wrong closing parenthesis :wink:

The line should be:

return float2x2(matrix[0][0],matrix[0][1],matrix[1][0],matrix[1][1] * scale.xxyy);

Are you sure? that doesn’t make sense. That would be (vec2, vec2, vec2, vec2 * vec4). The current one is (vec2,vec2,vec2,vec2) * vec4

I tried changing to to something a little more verbose:

float4 intermed = float4(matrix[0][0],matrix[0][1],matrix[1][0],matrix[1][1]) * scale.xxyy;
return float2x2(intermed.x, intermed.y, intermed.z, intermed.w);
1 Like

It works now! Thanks.

1 Like

w00t! Thanks for testing!

Hi @hunterk

I have a similar problem with the slang version of crt-royale. It loads but the screen stays black. I don’t see anything special in the log. Please help! :slight_smile:

Just a little bump :slight_smile: