What shader do you use for Virtual Boy?

I was going through my systems 1-by-1 and setting core presets for things like RF on the TurboGrafx or S-Video on CDTV… but then I got to Virtual Boy and I’m kinda stumped.

There was some talk about a color changing shader, and multiple threads on SBS 3D stuff, but not much else. It’s kind of a weird system, obviously, and I don’t know a lot about it’s display exactly, so I’m wondering what kind of shaders you guys use for this system.

It’s not authentic, but I think they translate well to DMG/GBP shaders. The authentic eye-searing red is pretty unpleasant, IMO.

1 Like

I took a look at the Game Boy Pocket shader, once I switched the VB pallette to Black & White it looks much easier on the eyes. I’m wondering though, is there any shader that just inverts color?

Looking at it through the GBP shader, i’m thinking if I ran a color invert, and then the GBP shader on top of that, it should look just like a gameboy game. I didn’t see anything that would invert colors in img_adjustment or anything though.

I did find this actually just now, but it’s in glsl and not slang. :frowning:

just add this line at the end of any shader:

FragColor = 1.0 - FragColor;

1 Like

Ok, so the I added the invert to stock.slang

#version 450

layout(push_constant) uniform Push
	vec4 SourceSize;
	vec4 OriginalSize;
	vec4 OutputSize;
	uint FrameCount;
} params;

layout(std140, set = 0, binding = 0) uniform UBO
	mat4 MVP;
} global;

#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;

void main()
   gl_Position = global.MVP * Position;
   vTexCoord = TexCoord;

#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;

void main()
   FragColor = vec4(texture(Source, vTexCoord).rgb, 1.0);
   FragColor = 1.0 - FragColor;

Which produced this, so I think that portion worked.

Then I applied the Game Boy Pocket Shader and got this:

While the screenshot looks fine, anything moving produces this horrible white ringing on the edges of objects. I honestly can’t believe it’s not ‘in’ the screenshot at all. I tried taking like 15 screenshots and it doesn’t show up in any of them. But like, as an example if a ball rolls across the screen, there’s a bright white trail behind it.

Is it something I did wrong with the shader addition maybe? I’m not sure why it would be doing that.

So turning down LCD response time fixes the weird white ghosting (turning it up all the way completely negates inversion, strangely) Sadly the transition wasn’t as smooth as I thought. Some of the art really doesn’t work well, some of it looks better, it’s all over the place lol

Kind of an interesting look into how the art for a system like this was designed though, like where you’d use inverse shading and things.

1 Like