Graphics Shaders for hobby programmers: Newest Video: LUT maps

Dmi7ry

Member
I always wanted to make a shader that makes pixels smoother but don't know how they work. You know, the filters in some 8 bit consoles emulators.
The left image upscaled using Nearest neighbor, middle — hq4x, right — vectorization (Adobe Live Trace).

https://johanneskopf.de/publications/pixelart/paper/pixel.pdf

P.S. Or just try to google hq4x shader.
P.P.S. Ops, sorry. Their algorithm isn't hq4x. But anyway now you know where to go.
 
Last edited:
I'm just wonderful with this series. is something spectacular.
I really liked the sprites any restriction for friend use? Thank you so.
 
I really liked the sprites any restriction for friend use
I left license note inside the project file and added links beneath each video where I used assets from artists. Those links also describe the licenses.
But all of them should be at least free for non-commercial use and some artists ask to be named.
 
I left license note inside the project file and added links beneath each video where I used assets from artists. Those links also describe the licenses.
But all of them should be at least free for non-commercial use and some artists ask to be named.
very good, fantastic work, friend, I will be checking all the would be in order to implement in my projects.
 

gdkid

Member
New video uploaded: Bloom with multiple render targets so we can set bloom uniforms per layer instead of blooming the finished application surface.

View attachment 18013
Hi Reverend

Thanks for the bloom tutorial

I applied the effect, it looks soooo great. However, I noticed that I can't use image_blend to set color to a sprite, or even set alpha to it.

Every time I tried to set color using image_blend with a white sprite, it has no effect at all.

Did I do something wrong?

THanks in advance.
 
@gdkid : I just tested the MRT Bloom shader by adding those two lines to the player objects begin step event:

Code:
image_blend = make_color_hsv(color_get_hue(image_blend)+1, 255, 255);
image_alpha = sin(current_time / 500) * 0.4 + 0.6;
and this is the result:
MRT_Bloom_with_v_vColour.gif

So what I tried works. So I'm guessing you meant something different? :)
 

gdkid

Member
@The Reverend

Yes, this is exactly what I wanted :) , however, I can't achieve it so far.

When I use your two lines of code, the player object doesn't seem to change color at all (wonder if I did something wrong)

I also recorded what I did

I'm using project Shader_Tutorial_Series-21_Magnifying_Glass_Distortion

 
@gdkid : I think I found the problem. The HLSL shader in that project file isn't multiplying the vertex colour and thus ignoring image_blend.

  • Open the fragment shader of shd_bloom_HLSL_MRT_luminance
  • multiply the base colour with the vertex colour.
    There's a line setting the output colour for the application surface, just add "* INPUT.Colour":
    Code:
    OUTPUT.base_col    = base_col * INPUT.Colour;
  • multiply the bloom colour with the vertex colour.
    There's also a line setting the output colour for the bloom surface, just add "* INPUT.Colour":
    Code:
    OUTPUT.bloom_col= base_col * INPUT.Colour;

I think the GLSL shader is doing that already and the GLSL ES shader as well. So it should work on mac, linux, iOS and android
 
Top