Remaking LOOP HERO's CRT Effect

  Рет қаралды 51,616

Acerola

Acerola

Күн бұрын

Пікірлер: 145
@DanIel-fl1vc
@DanIel-fl1vc Жыл бұрын
I do not understand why seemingly every single adult programmer I've ever encountered on the internet has a picture of a tiny toddler anime girl as an avatar or randomly pop into their youtube tutorials. 6:42 The pattern is too common, there's some connection. Maybe when they were kids they were obsessed with pokemon and naruto and the anime girls on screen were their first love and that love never went away as they grew older or something. Because it freaks me out every time I see it, it's like someone pulling their pants down for a split second in the video revealing their darkest desire and I'm like woah what the hell. Besides that, the programming is interesting.
@Acerola_t
@Acerola_t Жыл бұрын
I think you're the weird one here actually
@DanIel-fl1vc
@DanIel-fl1vc Жыл бұрын
@@Acerola_t Maybe on programming discord channels and inside of FF14 it's considered normal. But trust me, you walk down the street in the real world, enter a construction site with a bag full of toddler pictures, they'll look at you weird. And if they're pictures of cartoon children, they'll be even more confused. Don't you like Frank Frazetta, Tolkien, you know adult stuff. There's something about hardcore programmers, and I'm not only referring to you. Most of you seem to be running the same software. Maybe if we force feed young males squeaky anime toddler girl entertainment for breakfast they'll grow up to become capable programmers.
@Acerola_t
@Acerola_t Жыл бұрын
@@DanIel-fl1vc no no I still think you're the weird one here
@DanIel-fl1vc
@DanIel-fl1vc Жыл бұрын
@@Acerola_t Yeah maybe I'm weird "here". Clearly most wanna be game developers are into my little pony tier toddler entertainment. I think it's just a generation of sheltered boys that got stuck in middle school. When all the other kids were out going through rites of passage they sat at home with cartoony video games and movies. These things later fueled their interest in programming and still does. It's their standard of the greatest art imaginable. Which is why they're blind when it comes to how others perceive their interest of what's CLEARLY cartoons of children. Flashing a picture of Disney's Tarzan would still be weird but at least it's a badass guy fighting leopards, music's alright too. But a three year old child... Hopefully you'll slowly ease off of it, I can't imagine it's healthy to have such proclivities. Especially when you grow older into your 50s and beyond.
@Timsturbs
@Timsturbs Жыл бұрын
ahah xD what a load of bs.. "..Disney's Tarzan.." nice, so Tony the tiger is fine.. wont be surprised if his son has a 3k$ cartoon dog suit. hilarious xD
@chrisminnoy3637
@chrisminnoy3637 Жыл бұрын
The most important CRT effect was not the curvature or the metal grid, but the glow and blend effect of the phosphor layer. A single pixel would not be sharp as with LCD, but start as a round dot on the left side and have a smear on the right side due to the falling voltage of the electronbeam. This effect makes that near pixels blend into each other, making a smooth look. Pixel artists used this effect to show gradient effects of many colours, while in reality the colour palette was very limited on those early machines. One had to take into account the beam direction (always from left to right) and the horizontal frequency into account to reproduce that effect on an LCD/OLED screen Not sure what the math would look like, but it can't be that hard to figure out.
@Sibula
@Sibula 7 ай бұрын
Yeah, especially for a pixel art game with low resolution and small color palette the smoothing effect was incredibly important. If you play any old game like that on a modern display it looks like crap.
@T0K0R1.N
@T0K0R1.N 5 ай бұрын
The game Fight n rage I think actually does this round smearing effect on it's CRT effects shader and it looks amazing, would love to see @Acerola take a look at that game.
@ethanbelton9522
@ethanbelton9522 2 жыл бұрын
I like this type of video. I want to see more of it. Maybe you can show more of the coding side so us dummies who just started learning C++ can get a better grasp on how the math correlates.
@terryriley6410
@terryriley6410 Жыл бұрын
There is zero c++ involved. I suggest reading the Book of Shaders articles online, this effect is super simple once you understand the basics of fragment shaders.
@grochlin7106
@grochlin7106 2 жыл бұрын
honestly such a good video, i could say a lot but i'll keep it brief: i want to see more!
@Acerola_t
@Acerola_t 2 жыл бұрын
Thanks Grochlin ;; need to stop by and see your progress on your racing game soon
@cheesycoke
@cheesycoke 2 жыл бұрын
I personally wish more CRT shaders for games would emulate the color blending of old analog video signals, though I do kinda get why they don't between the way it may mess with certain visuals, the difficulties, and how much it might hurt performance.
@Roxor128
@Roxor128 Жыл бұрын
I actually wrote a shader that reproduced the artefacts of the PAL TV system. It basically implemented the whole system on a small snippet for each pixel. Encoded the input, optionally added noise, then decoded it again. I have no illusions about it being fast, but it worked. Turning on the noise was just awful for performance.
@lilyofluck371
@lilyofluck371 Жыл бұрын
I was literally just going to write a comment about that
@Sibula
@Sibula 7 ай бұрын
@@Roxor128 At least if you just want to make old games look right again, performance isn't really much of a concern, unless your shader takes more time per frame than the game did back in the day. If you want to recreate the effect in a modern game with modern standards for frame rate and resolution, then it might be something to consider.
@Tarodev
@Tarodev 2 жыл бұрын
Nice one 👍 Thanks for supplying the source code
@Acerola_t
@Acerola_t 2 жыл бұрын
No problem! I try to supply the source code for all my vids, even if it isn't written for general use.
@SamHartwell420
@SamHartwell420 2 жыл бұрын
I'm gonna call it here. I've been recommended quite a few of your videos and in the past few days have seen your subscriber count grow from 5k to 7.5k. I believe you have been blessed by the KZbin algorithm gods. We will watch your career with great interest.gif
@Acerola_t
@Acerola_t 2 жыл бұрын
It's been pretty crazy yeah, thanks for watching!
@SamHartwell420
@SamHartwell420 2 жыл бұрын
@@Acerola_t dude, thanks for the amazing content!
@coyotetime
@coyotetime 5 ай бұрын
Very cool video. I was seeing how far I could follow along with just the video but then got stumped why my image wasn't warped but just kind of scaled down. Then I looked at your code link and saw that to calculate the offset you swap the X and Y components of the UV before dividing ( uv.yx / _Curvature;) which I didn't realize from 2:02 . I was then able to adapt this to Godot. Thanks!
@wide-awake
@wide-awake 2 жыл бұрын
very cool. i've heard that some CRT shaders (notably crt-royale) go much further into actually emulating the physics of a CRT when generating their image. that could make for a cool video!
@PotatosDispenser
@PotatosDispenser 2 жыл бұрын
You deserve way more subscribers ! Looking forward for more content :D
@maglight117
@maglight117 2 жыл бұрын
Just found your channel, holy shit your content is so nice. It's the right mix of math, funny jokes and explanation.
@Matojeje
@Matojeje 2 жыл бұрын
Nice recreation! That being said, I still don't understand why one wouldn't want to warp the scanlines, is it to prevent some funky moire patterns or something?
@Acerola_t
@Acerola_t 2 жыл бұрын
Probably something like that yeah, I didn't actually try to see what warping the scanlines would look like.
@guiorgy
@guiorgy 2 жыл бұрын
🤔
@dranyth
@dranyth 2 жыл бұрын
I converted this effect into Shadertoy just to experiment around with it a little and I think the reason they didn't warp the scanlines is because the scanlines warp the 'wrong' way with this effect. The middle parts of the lines warp towards the middle of the screen instead of away from it as they would with an actual CRT. The effect is pretty subtle at low amounts of warp anyway, but I suppose straight across means they're closer to how they should be for a CRT than if they were slightly warped the wrong direction.
@terryriley6410
@terryriley6410 Жыл бұрын
​@@dranythYou could implement a different warp. Scanlines make more sense when they are warped too and they look better as well.
@DrClementShimizu
@DrClementShimizu 2 жыл бұрын
Very good. The effect has a good vibe.
@IsaacHisey
@IsaacHisey 2 жыл бұрын
I like these types of case study videos. I have let you know. - in an acerola voice cadence.
@DubUltra
@DubUltra Жыл бұрын
i like this kind of case style video, so i am letting you know
@tamaskutlak5754
@tamaskutlak5754 2 жыл бұрын
I'm sure it was asked before but are those title-cards inspired by the Monogatari series? I've been binging your videos at I felt similar so I had to ask. Also thanks for the video :)
@Acerola_t
@Acerola_t 2 жыл бұрын
Yeah it's my favorite show
@thearkheartguy
@thearkheartguy Жыл бұрын
Really good work, man. I'm impressed :)
@Some_one11237
@Some_one11237 Жыл бұрын
i m not understading anything about sin ad shit but i m still watching this, it's interesting :D
@microdavid7098
@microdavid7098 2 жыл бұрын
I've been enjoying these videos
@funky_pepe
@funky_pepe Жыл бұрын
Love it when you suddenly stumble upon one of those "creator who makes great content and cares about it" channels
@graph-gear500
@graph-gear500 Жыл бұрын
Hey Acerola, have you played Signalis? I think it's worth looking into as it has a lot of cool shaders and effects that might interest you. It also has a CRT effect.
@harpbeat500
@harpbeat500 2 жыл бұрын
this is exactly the info i needed
@stefan429
@stefan429 19 күн бұрын
for those using URP in 2022 LTS (maybe applicable to 2023 LTS), you need to change the CRT script to be a custom render pass and add it as a URP feature , instead of using OnRenderImage in a script on a camera :)
@kkibi
@kkibi 2 жыл бұрын
good video! keep up the good work!
@Acerola_t
@Acerola_t 2 жыл бұрын
Thank you!
@Caiiiiiiiiii
@Caiiiiiiiiii Жыл бұрын
Damn, how did he know I’m watching this in the future
@LSatoDemo
@LSatoDemo Жыл бұрын
Awesome video
@Povilaz
@Povilaz Жыл бұрын
Very interesting!
@meth42
@meth42 2 жыл бұрын
incredibly underrated channel, inspiring work as well. you make it all seem doable unlike most game making related content
@VictorColli
@VictorColli Жыл бұрын
This is brilliant
@Mcbuzzerr
@Mcbuzzerr 2 жыл бұрын
I really like your videos, you explain all this display math so well!
@Acerola_t
@Acerola_t 2 жыл бұрын
Thanks!
@DietrichMischke
@DietrichMischke Жыл бұрын
I think it'd be super interesting if you did this same thing with the trippy background patterns in Balatro
@__Rizzler__
@__Rizzler__ 11 ай бұрын
i love case study. gimme all of it
@drtringuyenzmc
@drtringuyenzmc 2 жыл бұрын
Super! please make more
@DoodleDan
@DoodleDan Ай бұрын
Glad i remembered this game lol, I'm making one for my game but currently it's just looking like a CRT effect that is ruining all the font lol
@gabboman92
@gabboman92 2 жыл бұрын
yay "new" acerola video
@AntsanParcher
@AntsanParcher 2 жыл бұрын
Texture samplers have a parameter that tells them how to sample the texture outside the [0,1]² range, so having a branch to return black when you're outside that range is unnecessarily expensive, as long as you can set that parameter. Sadly I'm using a lisp library to do this kinda stuff, so I don't know how you'd do it in C#, but I think looking for something like CLAMP_TO_BORDER should give you relevant results.
@RH3KOU
@RH3KOU 2 жыл бұрын
Maybe can use like this to avoid the branch: ``` half isBlack = uv.x = 1.0f || uv.y = 1.0f; color = color * (1 - isBlack); // if (isBlack) color = 0; ```
@dmitryburlakov6920
@dmitryburlakov6920 Жыл бұрын
I honestly have a lot of questions about that, but I wonder if it really has any practical effects. We don’t have branch prediction, and assuming that jumping to sampler instead of jumping over one instruction is quicker; disregarding the fact that seemingly for the sampler to actually have the same check is the only possible way it works, sounds quite controversial to me. I have a feeling that branching avoidance became a cargo cult. Though the comment above has a good idea anyway.
@gunnaryoung
@gunnaryoung Жыл бұрын
This is definitely a tiny nitpick but I feel if you're gonna do a CRT effect, the aspect ratio shouldn't be 16:9. Either way, great video, if you do a follow up, definitely add that high-frequency hum that you can feel in the back of your skull!
@Acerola_t
@Acerola_t Жыл бұрын
lol the shader will work the same regardless of aspect ratio so no need to worry
@gunnaryoung
@gunnaryoung Жыл бұрын
@@Acerola_t, yeah, fair
@goosle
@goosle Жыл бұрын
Finally, someone who knows what this game is
@generatorrex6196
@generatorrex6196 2 жыл бұрын
Just... How did you realize that they were using cos with sin here 6:22 ? (awesome channel, i'm watching all your videos lol)
@Acerola_t
@Acerola_t 2 жыл бұрын
cause they oscillate in opposite directions thanks for watching!
@generatorrex6196
@generatorrex6196 2 жыл бұрын
@@Acerola_t Oh, nice nice thx
@radicant7283
@radicant7283 Жыл бұрын
Omg Alpha Centauri spotted
@Kestrel_
@Kestrel_ 8 ай бұрын
hey! thank you for this video! this is exactly what i would like to use for my upcoming game! however, i have a question i was hoping you could answer. in my case, im looking for a more pronounced effect, however im worried about the distortion making it hard to click buttons closer the the corners. do you know how to map the mouses position to the rounded crt effect?
@RH3KOU
@RH3KOU 2 жыл бұрын
Thank you very much for your sharing! I want to get a closer understanding of "cubic function" (I have searched this but still don't understand why the value can be calculated by uv+offset*uv*uv as in the example code). Is there any link or article about this?
@goldsocks9999
@goldsocks9999 3 күн бұрын
Funny how the game that made me want to learn how to do this effect is Loop Hero
@TheZenytram
@TheZenytram 2 жыл бұрын
more video as this one pls.
@Acerola_t
@Acerola_t 2 жыл бұрын
If you have any game effects you'd like to see recreated let me know!
@josewenzel
@josewenzel 2 жыл бұрын
I use a pancake recipe from the same website that the chocolate chip cookies recipe. funny
@niekjonker
@niekjonker Жыл бұрын
Hey Acerola, I'm using your shader and inverting the effect on the X axis to create kind of a helmet curvature. How do I ensure the mouse position for all elements in my straight UI properly maps to the new projection? I exposed the two values in uv + uv * offset * offset. I'm getting good visual results by doing UV * UV * 0.6 * 0.5. Is this causing my problems with rayvasting?
@ZennMagic
@ZennMagic 2 жыл бұрын
Honestly, the grayscale every six lines looks better, imo
@gkraker04
@gkraker04 2 жыл бұрын
please study more cases. k thx
@phov02
@phov02 Жыл бұрын
muito bom o vídeo valeu
@derkoi
@derkoi Жыл бұрын
Has anyone got this to work in URP?
@SleepyMockii
@SleepyMockii Жыл бұрын
any chance a ctr effect like that would be able for obs? i can't make it my self but asking won't hurt =w=
@Acerola_t
@Acerola_t Жыл бұрын
yeah you can write obs plugins that apply shaders to the output, maybe someday I'll do it but at least you know it's possible!
@SleepyMockii
@SleepyMockii Жыл бұрын
@@Acerola_t hehe glad to hear that~ And if ya someday would do it I'll be sure to be the first to jump ya~
@AndréLucasSilvadeCastro
@AndréLucasSilvadeCastro 2 ай бұрын
Acerola, like the fruit?
@caelrowley8001
@caelrowley8001 Жыл бұрын
Is the background track from Breath of Fire 3?
@Acerola_t
@Acerola_t Жыл бұрын
Nope it's probably the one from Loop Hero
@caelrowley8001
@caelrowley8001 Жыл бұрын
@@Acerola_t wrong! the first song thats played is loop hero, but Im 99.99% sure the song looping afterwards is from breath of fire 3. btw I hate writing shaders but love your videos, perfect mix of comedy and information
@Acerola_t
@Acerola_t Жыл бұрын
@@caelrowley8001 I can assure you it's not breath of fire 3, all the music used is listed in the description. Also thanks!
@caelrowley8001
@caelrowley8001 Жыл бұрын
@@Acerola_t I stand corrected, the song that was confusing me was During the Test
@nintendude794
@nintendude794 2 жыл бұрын
What about the filters and effects options in Blasphemous?
@Acerola_t
@Acerola_t 2 жыл бұрын
I can check that out yeah
@nintendude794
@nintendude794 2 жыл бұрын
@@Acerola_t sweet! Thanks!
@nintendude794
@nintendude794 2 ай бұрын
@@Acerola_tdang I’ve been here already. That’s depressing. Played Animal Well?
@HenryLoenwind
@HenryLoenwind Жыл бұрын
sin and cos for a 3-pixel pattern? Why not just use a 1x3 pixel texture?
@Acerola_t
@Acerola_t Жыл бұрын
because sampling a texture would be more expensive than computing a wave.
@sadsadsad5000
@sadsadsad5000 Жыл бұрын
any chance you could translate this into shader graph?
@Acerola_t
@Acerola_t Жыл бұрын
no I only write shader code I am not proficient in shader graph, sorry!
@copycatlyn
@copycatlyn Жыл бұрын
so now how do this photoshop?
@Acerola_t
@Acerola_t Жыл бұрын
the best way to do it in photoshop would be to follow the same steps just with photoshop tooling to warp the edges and there's probably a crt filter for photoshop somewhere.
@NKCubed
@NKCubed 2 жыл бұрын
n n no you can't just understand everything like that 😟
@TheNormalUniverse
@TheNormalUniverse Жыл бұрын
I was hoping for a Critical Race Theory effect! Still an awesome video
@timetravellingblockhead2122
@timetravellingblockhead2122 2 жыл бұрын
How the FUCK did you just casually go "oh that must be a sinewave" and other things like that‽
@Acerola_t
@Acerola_t 2 жыл бұрын
trig functions are oscillators so when values are going back and forth it's probably a trig function
@timetravellingblockhead2122
@timetravellingblockhead2122 2 жыл бұрын
@@Acerola_t Thank you, that sounds so obvious said aloud
@warlockboyburns
@warlockboyburns Ай бұрын
A crt shader misses the point for me because it's about scientific nuance expanding my scientific mind and this is fake so this is a perversion of that sacred nuance headspace. The opposite of what I want.
@dsmiller95
@dsmiller95 2 жыл бұрын
When adjusting the frequency of the sin wave, did I miss where we multiply by pi? (sin(uv.y * screenHeight * 2 * pi/3)) It would make sense to gloss over IMO, but I want to check theres no extra magic going on! love your videos
@Acerola_t
@Acerola_t 2 жыл бұрын
I didn't multiply by pi
@dsmiller95
@dsmiller95 2 жыл бұрын
@@Acerola_t oh ok, now I am confused! I'll have to look closer at the video. Since Sin(x) is periodic over 2pi, I would except the horizontal lines to "drift" and maybe lose definition every 30 pixels. Perhaps it's too small of an effect to notice, or just blends in nicely
@kappasphere
@kappasphere 2 жыл бұрын
Remember the part of the video where he discovers that the pattern seems to repeat once every 6 lines and "fixes" it by increasing the frequency by a factor of 2 to get a period of 3? Obviously, he is applying the common technique of shader programming that is to ignore the math and do measurements by eye, and by those rules, you clearly get pi=3 and therefore any multiplication by pi becomes unnecessary.
@dsmiller95
@dsmiller95 2 жыл бұрын
@@kappasphere truth!! in the end it doesn't matter if you can't notice it even upon close inspection.
How Do Games Render So Much Grass?
15:52
Acerola
Рет қаралды 331 М.
1-BIT GRAPHICS IN UNITY | OBRA DINN TUTORIAL - SHADERLAB
6:20
Which One Is The Best - From Small To Giant #katebrush #shorts
00:17
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,2 МЛН
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 990 М.
The Strange Graphics Of LETHAL COMPANY
15:59
Acerola
Рет қаралды 881 М.
I Made a 1D Game 🎮
11:18
Mashpoe
Рет қаралды 1,7 МЛН
How Are Games Rendering Fur?
28:51
Acerola
Рет қаралды 469 М.
What's The Deal With Depth Of Field
14:36
Acerola
Рет қаралды 120 М.
Why you Draw Bad Assets || 2D Game Art
13:00
Nonsensical 2D
Рет қаралды 72 М.
Moebius-style 3D Rendering | Useless Game Dev
8:12
Useless Game Dev
Рет қаралды 840 М.
Deferred Lights - Pixel Renderer Devlog #1
8:41
aarthificial
Рет қаралды 395 М.
What I Did To Optimize My Game's Grass
8:13
Acerola
Рет қаралды 133 М.
This is the Kuwahara Filter
18:16
Acerola
Рет қаралды 437 М.
Which One Is The Best - From Small To Giant #katebrush #shorts
00:17