Discover and read the best of Twitter Threads about #hlsl

Most recents (2)

1/ Everybody told me they liked the last thread about simple effects in Pinni, so why not another one?

Customizable transition shaders in less than 4 lines 🧵:
#gamedev #tutorial #shader #hlsl #madewithunity
2/ Once again starting from a basic fragment shader. This will work in ANY engine, but we're using GLSL for simplicity.

Here's our base texture:
3/ What's the goal of this shader?

1. We want to black out the screen up to a certain point
2. That point should depend on the progress of the transition

Let's map the path of the transition in black and white. We can get a value based on each UV's distance from the center.
Read 12 tweets
1/ Have been asked about the Pinni distortion effect quite a few times, so thought I'd explain how it works.

One of my fave effects, displacement maps 🧵:
#gamedev #tutorial #shader #hlsl
2/ Going to start with a basic texture from Pinni to demonstrate each step.

The shader can work in any game engine; in Pinni we use Unity's awful shaders language, but for readability I'll be using HLSL. ImageImage
3/ Distorting an image from a fragment shader basically means taking each UV coordinate and moving it.

We want to move in the opposite direction of the origin, which we can get from the normalized (direction-only) result of our UV coordinate minus the center. Image
Read 14 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!