Attract-Mode Support > Themes

Theme to demonstrate CRT shaders

<< < (5/5)

keilmillerjr:
My iMac that I had to take a loan out for is now officially obsolete due to Mac OS X changing video requirements. I wish Apple would stop all these GUI enhancements and kept it simple like OS9. I don’t need 10 ways to open an app. I would much prefer clicking shutdown and having an instant black screen like on my 333mhz and 433mhz macs with os9.

keilmillerjr:

--- Quote from: Luke_Nukem on December 09, 2018, 10:19:19 AM ---
--- Quote from: zpaolo11x on December 09, 2018, 07:52:21 AM ---
--- Quote from: keilmillerjr on December 09, 2018, 05:46:34 AM ---CRT-CGWG: pass
CRT-Halation: pass with errors
  Failed to compile fragment shader:
  ERROR: 0:1: '' :  version '130' is not supported

--- End quote ---

This is because of OpenGL support on MacOS, I got the same error in my tests. MacOS doesn't allow to mix versions of OpenGL, and furthermore AFAIK XQuartz only support OpenGL 1.2

--- End quote ---

Changing the version number in the shaders works fine for macOS

--- End quote ---

If I change #version 130 to #version 120 on each shader with crt-lottes-multipass, I get the following errors:


--- Code: ---Failed to compile fragment shader:
ERROR: 0:101: Invalid call of undeclared identifier 'texture'

Failed to compile fragment shader:
ERROR: 0:103: Invalid call of undeclared identifier 'texture'
ERROR: 0:309: Invalid call of undeclared identifier 'texture'
--- End code ---

zpaolo11x:

--- Quote from: keilmillerjr on December 11, 2018, 05:30:01 AM ---
If I change #version 130 to #version 120 on each shader with crt-lottes-multipass, I get the following errors:


--- End quote ---

What if you get rid of the #version 120 line completely?

keilmillerjr:

--- Quote from: zpaolo11x on December 11, 2018, 05:40:17 AM ---
--- Quote from: keilmillerjr on December 11, 2018, 05:30:01 AM ---
If I change #version 130 to #version 120 on each shader with crt-lottes-multipass, I get the following errors:


--- End quote ---

What if you get rid of the #version 120 line completely?

--- End quote ---

Commented out or removed:


--- Code: ---Failed to compile fragment shader:
ERROR: 0:59: '==' does not operate on 'float' and 'int'
ERROR: 0:67: '==' does not operate on 'float' and 'int'
ERROR: 0:77: '==' does not operate on 'float' and 'int'
ERROR: 0:85: '==' does not operate on 'float' and 'int'
ERROR: 0:101: Invalid call of undeclared identifier 'texture'

Failed to compile fragment shader:
ERROR: 0:61: '==' does not operate on 'float' and 'int'
ERROR: 0:69: '==' does not operate on 'float' and 'int'
ERROR: 0:79: '==' does not operate on 'float' and 'int'
ERROR: 0:87: '==' does not operate on 'float' and 'int'
ERROR: 0:103: Invalid call of undeclared identifier 'texture'
ERROR: 0:309: Invalid call of undeclared identifier 'texture'
--- End code ---

zpaolo11x:
Ok just a quick update, I've noticed that as they are set sometimes the scanlines don't correspond 1:1 with the pixel resolution of the snaps. For the CGWG shader there are a lot of "resolution" parameter I can't get to grips with, but what's sure is that in the vertex shader there's a division by 200, so all snaps have 200 scanlines. I think you can pass the texture_height to that shader to fix this.

On the other hand I've found how to fix Lotte shaders with this respect. Notice that your layout file has this lines:


--- Code: ---        video.shader.set_param("color_texture_sz", vidSurf.width/4, vidSurf.height/4);
        video.shader.set_param("color_texture_pow2_sz", vidSurf.width/4, vidSurf.height/4);
--- End code ---

To make it work better I changed the first line so that it passes actual texture size to the shader, and also added support for vertical scanlines using the "vert" parameter. I didn't care to calculate the power of 2 texture for the other field, but it seems to work well anyway. Substitute the two lines with these:


--- Code: ---        video.shader.set_param("vert", (video.texture_width > video.texture_height ? 0.0 : 1.0));
        video.shader.set_param("color_texture_sz", video.texture_width, video.texture_height);
        video.shader.set_param("color_texture_pow2_sz", video.texture_width, video.texture_height);
--- End code ---

In this way you'll get correct scanlines that are exactly the same number as the vertical resolution, while aperture mask will be calculated as always at full resolution.

Navigation

[0] Message Index

[*] Previous page

Go to full version