#archived-shaders

1 messages Β· Page 38 of 1

thin crater
#

Like that

#

the object turns black

#

normal behaviour..?

regal stag
#

It may be best to try it in regular Forward path as well, so you can compare.

#

I would expect the object to appear shaded, not black though. Unless you've changed something in the CalculateMainLight subgraph too.

thin crater
#

okay, gonna try that soon

merry oak
#

Hmm, I'm not sure if that worked. I guess what I'm trying to do might not be possible. I want an object to draw itself only if it's either lined up with a stencil value of 0, or it's in front of the object that is setting the stencil to 1. To do this I figured that I'd have to make the object that's setting the stencil value to 1 only do that if nothing is in the way, but I suppose it won't know if anything is in the way without the other objects being drawn first which means that they won't be affected by what it does to the stencil value.

#

Sorry for the big jumble of text, but do you know if there's any other way to do this?

regal stag
#

I'm not sure I understand what you're trying to do

merry oak
#

Sorry it was a bit confusing. I want an object to only render if it either lines up with a stencil value of 0, or it is in front of the object that is setting the stencil value to 1.

thin crater
#

That is the calculateMainLight shader

#

so no, I didn't change it

distant dirge
#

that power is going black, i think thats whats confusing me here

thin crater
#

..Nevermind, you're right: main light intensity was 0 πŸ€¦β€β™‚οΈ

#

That's with a normal rendering

#

@regal stag I can confirm, outputting distanceAttenuation directly from the CalculateMainLight subgraph to the diffuse and using it as a base color, is the only thing that changes

#

so distanceAttenuation calculation is different and completely black in Forward+

regal stag
#

Looking at the URP/Lit shader, I've noticed there's a new keyword _FORWARD_PLUS which likely needs to be setup in the blackboard like the others.

thin crater
#

so close...

regal stag
#

Well, that's the master branch so might be too new. Could check Lighting.hlsl in your package files

uneven condor
#

I am trying to follow the guide for creating a post processing shader in HDRP. The default example has an intensity property, and I can't for the life of me figure out how to set that property. When I added it to a volume, it has an input for the shader material, but not the actual intensity.

public ClampedFloatParameter intensity = new ClampedFloatParameter(0f, 0f, 1f);```
thin crater
#

(commented code was the old code)

#

Also, I noticed that the LOOP_BEGIN and END is used outside the #if USE_FORWARD_PLUS

regal stag
thin crater
#

Here's defined the GetAdditionalLightsForToon

thin crater
#

In the first loop he loads the color, in the second.. no idea

#

they're using a lot of code that I've never seen, I'm trying to understand it by the names and logic, but that's very advanced for my humble hlsl knowledge

burnt crag
#

I was directed here to see if anyone has encountered this. My Main Preview in Shader Graph has been empty for a while now. I have tried clicking and dragging in the Main Preview window, but nothing changes. I have also tried different meshes, but it doesn't change. Not even a gray mesh. I have closed and opened the Main Preview. I have closed the Graph and reopened it. I have tried different Shaders. I have tried different projects, but it is all the same. I am using 2021.3.20f1, was using 2021.3.3.1f1, where the problem started. I have rebooted my computer, and restarted Unity multiple time. I haven't been able to find anything from Google Searches, so I am pretty lost, and having to save the shader and go into scene view for each change is getting bothersome.

lean lotus
#

By chance does anyone know any plugins that allow for like bindless textures for compute shaders? I am really needing them but unity doesnt have them by default

reef sail
#

Compiling Subshader: 0, Pass: Blit, Vertex program with <no keywords>
Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING```
#

anyone knows how to fix this error ?

unique oar
#

Hi, can I get some help on this? I'm trying to use an image effect shader to modify a texture like so:

            RWTexture2D<fixed4> _Tex2;

            fixed4 frag (v2f i) : SV_Target
            {
                fixed4 col = 1. - tex2D(_MainTex, i.uv);

                _Tex2[int2(0, 0)] = fixed4(1, 0, 0, 1);

                return col;
            }```
#

I needed to use #pragma target 4.5 for it to not throw an error, but even now it's still not modifying _Tex2

#

I'm currently just trying to change a single pixel to red to see if it works, but the texture is still entirely black.

tender tusk
#

How can I scale the circle of a fresnel effect? Because I want to make the circle a little bit smaller so that I can have a border (which is gonna have a different effect than the the fresnel circle)

unique oar
unique oar
lunar valley
tender tusk
#

Yeah but how can I separate the fresnel effect from an outside border?

lunar valley
unique oar
#

just cut off any values that are too high

#

if you're trying to separate it from the edges

tender tusk
#

I am doing a black hole shader, and I want the fresnel effect to be like purple for the black hole, and then around it have a distortion circle

unique oar
#

can u maybe draw what you're talking about, i dont think blend or i really know what you're trying to do

lunar valley
unique oar
tender tusk
unique oar
#

I'll actually be using data from one texture to decide which pixels to modify within another

#

I'll eventually switch to a buffer but right now I'm using a texture so it's easier to see if it works

unique oar
#

if you're worried about the fresnel not reaching 1 at the edges you can just multiply it before the branch

tender tusk
#

ok thanks!

unique oar
#

np

unique oar
#

as stated, i need unordered access, which is what i'm testing right now. but, the texture isn't being modified

brazen citrus
#

hello, i have a problem with 2d shaders

#

i have an object with an empty mesh fillter and a mesh renderer

#

i waant to add a 2d transparent material to it

#

i'm using universal render pipeline

#

but there is no urp shader time that accepts Albino and texture

meager pelican
#

@tender tuskAlso maybe check out the step() function/node.

shadow kraken
tender tusk
brazen citrus
#

i want to add a cutout transparent image

tender tusk
#

It's like the result is distorted (but not the twist distortion)

amber saffron
regal stag
# unique oar Hi, can I get some help on this? I'm trying to use an image effect shader to mod...

My understanding of this is very limited, but afaik it's required to use Graphics.SetRandomWriteTarget on the C# side : https://docs.unity3d.com/ScriptReference/Graphics.SetRandomWriteTarget.html
(then Blit/DrawMesh/etc, and ClearRandomWriteTargets after)

I've also read that the third param must be true for pixel shaders, but may be outdated info. This thread might help.
https://forum.unity.com/threads/how-to-write-to-an-unordered-access-compute-buffer-from-a-pixel-shader.403783/

#

I haven't seen it used often though, so it may not be well supported or something.

tender tusk
#

Yeah for now I am not doing any distortion, just picking the color already present in the screen.. But it shouldn't be black (with that weird green border) the outside of the black hole, I shouldn't even be able to see it if I am sampling the same color of the screen

unique oar
unique oar
#

The green is likely an artifact from not cutting off the fresnel effect properly.

tender tusk
tender tusk
#

And for the Predicate I should use a comparison node?

thin crater
#

Hello, I'm trying to understand how to get additional lights with Forward+ setting. Does anyone knows what InputData represents?

thin crater
#

Also SurfaceData, can't find any docs online

regal stag
#

SurfaceData is basically the ports you'd get on the Lit master stack
InputData is stuff like position, world normal, view direction, bakedGI - things you'd use during lighting/shading calculations

stiff dune
#

anyone got a clue on how I can save the original unmodified position of a vertex in shaderscript?

#

im using unlit shader preset

regal stag
stiff dune
#

yeah so basically the position of where it was at the moment I started running the program

#

so I can just add

struct v2f {
        float2 uv : TEXCOORD0;
    float3 worldNormal : TEXCOORD1;
    float4 vertex : SV_POSITION;

        float4 originalPos : TEXCOORD2; //added
};

or something and then simply never modify it?? sorry I'm really new to shaders

#

nvm i think i found it

#

yep i got it

#

i was trying to make a waving shader but wanted it to work on 3d objects so it doesnt smash it flat in the Sin wave graph kinda thing

#

i just saved the displacement from the graph in a member float above all structs etc. then i can subtract that from the vertex position before calculating the new displacement and then add it again.

frank sonnet
#

hey i get an error and i dont know what i do wrong her.

CGPROGRAM

           //define vertex and fragment shader functions
           #pragma vertex vert 
           #pragma fragment frag
           #define M_PI 3.14159265358979323846

float4 computeDerivatives(float4 position, float4 velocity, float s_R)
           {
               float t = position.x;
               float r = position.y;
               float theta = fmod(position.z, 2.0f * (float)M_PI);
               float phi = fmod(position.w, 2.0f * (float)M_PI);

               float T = velocity.x;
               float R = velocity.y;
               float Theta = velocity.z;
               float Phi = velocity.w;

               float sintheta = sin(theta);
               float scale = abs(sintheta);
               float sign = sintheta < 0.0f ? -1.0f : 1.0f;

               float T_prime = R * s_R * T * scale;
               float R_prime = -1 / (2 * pow(r, 3) * s_R - 2 * pow(r, 4)) * ((2 * pow(r, 3) * pow(s_R, 2) - 4 * pow(r, 4) * s_R + 2 * pow(r, 5)) * pow(Theta, 2) + (2 * pow(Phi, 2) * pow(r, 3) * pow(s_R, 2) - 4 * pow(Phi, 2) * pow(r, 4) * s_R + 2 * pow(Phi, 2) * pow(r, 5)) * pow(sin(theta), 2) + (-pow(s_R, 3) + 2 * r * pow(s_R, 2) - pow(r, 2) * s_R) * pow(T, 2) + pow(r, 2) * pow(R, 2) * s_R) * scale;
               float Theta_prime = -(2 * r * Theta - pow(Phi, 2) * r * cos(theta) * sin(theta)) / r * scale;
               float Phi_prime = -(2 * Phi * r * Theta * cos(theta) + 2 * Phi * R * sin(theta)) / (r * sin(theta)) * sign;

               return float4(T_prime, R_prime, Theta_prime, Phi_prime);
           }

do i use fmod wrong? or do someone know what my problem her is?

amber saffron
#

I think it's not about fmod but M_PI ?

amber saffron
frank sonnet
amber saffron
#

Try to add some spaces chars around M_PI ?

frank sonnet
#

nevermind

#

it worked XD

#

thx πŸ™‚

amber saffron
#

Or, just to make sure, does it still give the fmod error if you replace the two M_PI by the value

amber saffron
frank sonnet
#

the (float) thing

#

i thik i tried it before without define the variable M_PI because i thought it mite know it.

unique oar
#

sorry had to go sleep lol

#

this is what i'm talking about

#

you multiply by a number then use a comparison to switch to a different value once the fresnel effect has reached 1

#

currently i'm just making the border black, but you would plug in your distorted screen color or whatever it is you're doing into the false input of the branch node

tender tusk
#

Ok thanks ❀️

unique oar
#

np

tight phoenix
#

I am working on a shader and I noticed a faint square grid in it

#

What are possible causes for faint square grid like that?

#

more obvious when I make it small πŸ€”

#

I am using a render texture in this, its it maybe due to the size of the render texture?

#

maybe one of these parameters is responsible?

full ravine
#

How can I make the black parts of gradient noise transparent

#

So that when put into emission the parts that aren't white are the base color

#

I've remapped the color intensity of the gradient noise to a range from -10 - 10, and then used that to recombine the colors back together with the remapped value as the alpha

lean lotus
#

Hey how does unity take things like indirect lighting and apply it to objects? I want to override it with my own indirect lighting but idk how unity does it to start with

silent bloom
#

Thanks

low lichen
lean lotus
#

hmmmm ok
guess I need to come up with a way to apply screenspace indirect lighting to the scene then instead of just overriding the output

dim yoke
meager pelican
slim ginkgo
#

Hey, I'm trying to understand why the UVs map in this particular way when you connect the output of the lerp node to the input of the rectangle node... I guessed at first that pixels were being multiplied or added but that doesn't make any sense

#

Is there any resource for better understanding or gaining intuition on what said UV map will end up looking like / why it looks that way?

#

I'm aware already of what UV spaces are and how they map to 3D geometry but I don't understand the non-linear transformation that is occurring here

autumn sigil
#

Anyone exported a project to itch.io and have the colors come out weird and washed out? Mine did

#

coudl be shader compilation, possibly? Post-processing, lighting settings maybe

fossil fossil
quaint grotto
#

whats a simple way in URP to populate a buffer with an id based on the layer that a mesh has in the camera's view?

#

i cant figure out how to do it

#

like this

#

i cant use the stencil buffer

#

so i need another way

leaden radish
#

How to use a shader for having multiple effects that can be tagged around and offer if somebody knows how can I do that or video or something that would be really helpful

#

I just wanted to learn how to make a shader and apply that shader to material which allows you to have multiple effects which can be turned on and off with the check mark

old saffron
#

Is there a good way to do light wrapping? Basically it's like having a light behind you still affect the front edges.
We have the fresnel effect but I don't know how to get the light data from behind an object or how to modify its range of effect.

worldly drift
#

Is it possible to toggle the geometry pass with a define?
I can wrap the pragma in a define but if I also wrap the Geometry method I get an error that the geometry kernel is missing.
This works:

#ifdef _WIREFRAME_ON
            #pragma require geometry
            #pragma geometry Geometry
#endif

But this breaks:

#ifdef _WIREFRAME_ON
[maxvertexcount(3)]
            void Geometry(triangle Varyings IN[3], inout TriangleStream<g2f> triangleStream)
...
#endif
thin crater
#
  1. I have to declare the struct Varyings, but since I can't input/output different types in the shadergraph I think I have to input all the three variables as 3 different varibles in the graph inspector, right? Then I initialize my struct with those values
#

And with it I inizialize InputData, right?

#
  1. What is Position in clip space? In the shader graph, I've got world, view but not clip space 😦
regal stag
# thin crater 1) I have to declare the struct Varyings, but since I can't input/output differe...

The post is written from the point of view of shader code, not shader graph. It's still useful, but there's a lot of things that shader graph already does for you behind the scenes - such as creating the Varyings struct which is used to pass data between the vertex and fragment stages.
You don't have direct access to that struct, but it's used automatically when you need data (like Position, Normal Vector, View Direction nodes) in the fragment stage.

regal stag
#

Unless you actually plan on calling the UniversalFragmentPBR or UniversalFragmentBlinnPhong functions in Lighting.hlsl, you also shouldn't need to worry about the structs. They're basically just used for organising the input params.

regal stag
worldly drift
#

The shader without wireframe stuff would just be the default lit shader

#

I had to copy it to integrate the wireframe. Its sad that geometry shaders dont work with Shader Graph

regal stag
regal stag
regal stag
runic lark
#

does anyone know how i could make a shader of some form for bullet holes? (probably using decal projection unless ive missed something) I want to shoot an object and when i do it makes a transparent hole in it (like its been shot) i have no idea how to go about this since the only solution ive been able to find is for legacy rp, and im on hdrp. Ive attempted to adapt it to hdrp with little luck, and am wondering if im missing something obvious.

thin crater
# regal stag The post is written from the point of view of shader code, not shader graph. It'...

Mmh, okay, but as you adviced me some days ago my additionalLights hlsl function (that I use in a shader graph) might be broken for a Forward+ rendering, and if I want to use what should be compatible with Forward+ (LIGHTS_LOOP_BEGIN/END, for example) I need to build my InputData struct. And since this function is inside a shader graph, I think I need to get those variables from the shader graph. Right? or am I in the completely wrong path to resolve my problem?

#

digging deep into my function (outputting some values directly to BaseColor), it seems like the object doesn't find any additional light, so I guess that the getLight function that I was using is not compatible with Forward+. And the new one also needs InputData - at least it needs it in the code example that you gave me some days ago -

regal stag
#

URP id buffer

thin crater
#

As an example, using a simple code like that:

#

always says that

#

and including the package that has InputData, returns annother undeclared error 😦 (this time pointing at the LIGHT_LOOP_BEGIN row)

regal stag
# thin crater Mmh, okay, but as you adviced me some days ago my additionalLights hlsl function...

Right yeah okay, I see that some of the functions and the LIGHT_LOOP macros in that code use lightData. You can create it though. Should be able to do this before the loop :

// Create struct, initialising all values to 0
InputData inputData = (InputData)0;

// LIGHT_LOOP_BEGIN needs :
inputData.normalizedScreenSpaceUV = ScreenPosition;
// I think? Will need to add a param to your function to pass this in (with Screen Position node connected to the port)
inputData.positionWS = WorldPosition;
// (positionWS also required for GetAdditionalLight, if you use the version with the inputData param)

// if you use CalculateBlinnPhong, that needs :
inputData.normalWS = WorldNormal;
inputData.viewDirectionWS = WorldView;
#

Hmm, actually looking deeper it might not be the Screen Position node. Seems to use GetNormalizedScreenSpaceUV(positionCS);

regal stag
#

I guess so :\

thin crater
#

gonna try that

#

That's the code part

#

is it... right? it's giving me a "generic" error, meaning that there's no particular row underlined

#

Property _AddAdditionalLightsCustomFunction_d0b15a3a729646a89a7b75ce9b309ffd_New_10 already exists in the property sheet with a different type: 1
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

regal stag
regal stag
thin crater
#

..there's not a line 101

full ravine
#

How fast does the Time node's time value increase?

regal stag
full ravine
#

Okay

regal stag
#

Or trying to add any includes?

thin crater
#

uh yeah, I'm using the Input.hlsl

#

*including

#

oh

thin crater
#

removed that, the error is gone

regal stag
#

Yeah shader graph is probably already doing the include for you somewhere

amber saffron
regal stag
#

Ah right, I misread that part

thin crater
runic lark
thin crater
#

It now has got a point light!

#

There's still two problems, 1) the point light is not applying any color - as if it's always white, and the cube has a weird white light even when both directional and point light are disabled. I'm gonna try to resolve them

thin crater
#

By "A" component, you mean the alpha of the texture?

regal stag
# thin crater By "A" component, you mean the alpha of the texture?

I mean the forth component of that Vector4 from the multiply with matrix. (replicates the "perspective divide" step between the vert/frag stages)

But I'd also probably try it with the Screen Position node and see if that works. I'm a little confused by what the difference is between that and this GetNormalizedScreenSpaceUV(positionCS). Seems there's some _ScaleBiasRt and _ScaledScreenParams but I'm not too sure what these are doing.

thin crater
#

Like that...?

#

I'll also try with screen position

regal stag
regal stag
#

Not really what I meant, but again this is equivalent πŸ˜…

#

I gotta go, so hopefully it works now / you can figure it out / or someone else can help out further maybe πŸ™‚

thin crater
#

Ok, thanks a lot

grizzled bolt
#

Is there a meaningful getting scene depth with the Scene Depth node vs Screen Position W

thin crater
#

all the three methods does the same, the light doesn't change the object's color and the object has light even if there are no lights πŸ€” but at least I'm sure the GetAdditionalLight function is working!

#

I'm sure this is a different bug btw, something that is not linked to the code

amber saffron
thin crater
#

I might have modified something in the way to get there, something that was needed and now it's broken, so I'll just rollback everything and apply what I've done now

regal stag
#

(okay actually leaving now πŸ˜… )

grizzled bolt
thin crater
#

oh man, it works

#

@regal stag tysm, really

thin crater
#

Well everything works correctly, but...

#

anyone got any idea of what's causing it?

low lichen
thin crater
#

Mmh... it should not be infinite or very long.

#

that's the final loop

livid flame
#

Is there any way to make multiple sprites use 1 global texture. From this:

#

to this:

#

With shadergraph*
(@tag me or reply to me; thanks in advance!)

junior kelp
# livid flame

use a sampletexture2d node, and a position node - plug the position (maybe the xy, or xz, depending on your game) into the UV input on the sampletexture2d

#

you might also want to use a tiling and offset node to make it easier

#

make sure the position node is set to worldspace

livid flame
#

Thanks! This works great

prisma fox
#

EDIT:
Resolved:
Seems that simply moving the following macros from the Vertex shader pass to the Geometry shader pass (and the UNITY_VERTEX_INPUT_INSTANCE_ID statement to the Geometry input struct) did the trick .
I was surprised to see that it was possible to pass the Geometry input Triangle and TriangleStream variables directly.

UNITY_SETUP_INSTANCE_ID(IN);
UNITY_TRANSFER_INSTANCE_ID(IN, triangleStream);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(triangleStream);

Then, just call the UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN) macro in the fragment stage.

Original Message:
Is there any direction on configuring a custom shader with a geometry pass in URP to work for VR?

Specifically implementation on the following areas:
UNITY_VERTEX_INPUT_INSTANCE_ID and
UNITY_VERTEX_OUTPUT_STEREO

I've successfully implemented these two in a standard Vert/Frag shader but am a little stumped at the correct implementation in a Vert/Geom/Frag shader.

Implementation in the Vert/Frag was by the following:
Added UNITY_VERTEX_INPUT_INSTANCE_ID to my Attributes struct,
Added UNITY_VERTEX_INPUT_INSTANCE_ID and UNITY_VERTEX_OUTPUT_STEREO to my Varyings struct
Added UNITY_SETUP_INSTANCE_ID(IN), UNITY_TRANSFER_INSTANCE_ID(IN, OUT), and UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT) to my Vertex pass
Added UNITY_SETUP_INSTANCE_ID(IN) and UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN) to my Fragment pass

That worked fine. When I try the same in the Vert/Geom/Frag shader, I get errors such as "invalid subscript 'instanceID'".
What else would I need to do, or what would I do differently, to get this working with the Geometry pass? I'm specifically unsure how to handle the Geometry pass. I suppose I need to call some of these methods in it, but I'm not quite clear on how I would do that?

snow linden
#

I’m really new to the channels in the discord so I just joined but is there anyone that might know why all my shader graf shaders appear correctly when I’m playing my game through steamvr and yes it’s a VR game but when I build a apk it shows up as purple when I’m playing on standalone quest? Please help me could it have something to do with the xr interaction toolkit or what plz help?

thin crater
#

It could be different settings set between the various platforms

#

you can see them in preferences

#

I had that problem too but betweeen the build and the editor, in the same PC, it was some setting different from the build to the editor playmode

#

Has anyone any idea why my light act again as a "black" light when it has a low intensity value?

#

Like that:

#

The dark spot under the player is actually a light, but compared to the campfire light it is too much low so it just "decreases" the campfire's light, applying only the torch light

#

I'm almost 100% sure it depends on this code; that sums all the lights color, diffuse and specular. I tried to play a bit with all the settings (you can see the commented code), and all had similar behaviours, but none of them actually fixed the black light - except one, the one where I just summed all the lights colors between them without conditions, but it turned the whole world bright

merry oak
#

Does anyone know how to get an unlit shader that renders a different texture in each eye (for a headset)? I'm able to get it to work for a surface shader, but I don't want lighting, and for unlit shaders, it either doesn't render in the right eye, or it uses the same texture for both. (Sorry, not sure if this should be in virtual reality or shaders).

thin crater
#

The best effect I obtained was with comparing the various diffuses and checking which was the highest, and using that color. The problem is that sometimes the diffuse of the torch is higher than the Campfire's lights, so a darker color gets selected instead of the brighter one. That's a problem!

#

Here, the light is darker but more uniform - as it should, in a toon shader

simple pagoda
#

How can I make a mesh from Camera A get replaced with Camera B's render output? I am using the default renderer.

#

Like this, sortof.

#

Also, not highest priority, but if possible, I would also like to make the camera only render where it will actually need to, since most data will be discarded. It doesn't need to be pixel perfect, but if I could reduce how much it rendered, that would be nice.

#

I am not sure how well this fits the channel, but I didn't see a better one.

#

Specifically what I am doing is creating an overly-realistic scope which can be viewed from any angle. I have a script which correctly places the camera in the right position, sets the FOV, and does some weird clipping plane shenanigans to make it only show what happens after the scope. All I need to do is to place what it renders ontop of the main camera's view where the scope is.

meager pelican
# prisma fox **EDIT:** **Resolved:** Seems that simply moving the following macros from the V...
meager pelican
simple pagoda
prisma fox
merry oak
#

Does anyone know how to get an unlit shader that renders a different texture in each eye (for a headset)? I'm able to get it to work for a surface shader, but I don't want lighting, and for unlit shaders, it either doesn't render in the right eye, or it uses the same texture for both. (Sorry, not sure if this should be in virtual reality or shaders).

regal stag
#

At the bottom there's an example with different colours in each eye too. You'd do something similar, but swap the properties out for texture samples.

merry oak
#

It worked, thank you!

crimson cape
#

Any one has shader for pinch distortion use for camera mobile?
I want to pinch at a position that i create by code?

unique field
#

hey guys, so I'm pretty new to all this and I don't know anything about rendering stuff or shaders and I barely know anything about materials in unity, but can anyone help me make this look more like it does in this render?

tall chasm
#

I brought over my shader graph from unity 2019 over to 2021 and suddenly it's broken. please help.
in 2019 it was called LRP

tall chasm
#

i recreated it and it's working

old saffron
# regal stag Would depend what pipeline your using and whether it's code or graph. But for UR...

Took me a while to realize that this is the exact same package that a tutorial (that I've been struggling to follow for the past 8 hours) required me to have out of nowhere.
It does not want to install. When it did install, it caused more confusion and new errors popped up.
I have no clue where to go with the package or what other resources to help figure out how to get the result I'm aiming for.

nimble otter
tropic crow
#

Hello! Is there a way (and if possible using ShaderGraph/a custom node/Amplify) to render and object only in one eye, left or right, in VR ?

rare wren
olive aspen
#

How do I make a shader that applies over the entire screen with shadergraph in urp?

amber saffron
wide thicket
#

I'm trying to get these clouds (two separate objects) to move and bob at different speeds, though when I change the exposed material properties it changes for both of them, how can I make exposed material properties unique?
most objects in my game will be using the same material to handle sprite effects (wiggle, panning, bobbing, etc), but will need the properties to be different depending on the context:
https://gyazo.com/b2a35da239c1299ab3cefad01d17b232

amber saffron
wide thicket
unique field
wide thicket
rare wren
amber saffron
unique field
rare wren
rare wren
#

Look for UV unwrapping and texturing guides

unique field
#

what key words should I look for?

#

I've done uv unwrapping and texturing, at least I think. That's how I put that texture on the model. But there has to be more that I'm missing

wide thicket
#

custom shader graph material causes my sprite renderer to turn invisible and play no animations? any ideas?

rare wren
stray basin
#

how i can fix it

grizzled bolt
stray basin
#

The red wall has to look like orange

grizzled bolt
stray basin
#

Oh okay, thx i will try

pine arch
#

Anyone know the name of the float in the HDRP/Lit shader to get/set the Iridescence thickness ? I looked inside the shader code but can't figure it out.

grizzled bolt
pine arch
#

i tried with a _ between the two words, i'll try this one

grizzled bolt
#

Shows up with that name when looking through the debug inspector

pine arch
#

oh nice trick

#

thanks

lean lotus
#

Say I have 3 compuite buffers I want to merge into 1 large compute buffer?
whats the absolute fastest way to do this?
I need it to be fast as hell because its actually 6000 objects and 20 million total entries...
Currently I use a compute shader to transfer each of those 6000 buffers into the big one but its not fast enough anymore

dire cosmos
fickle oriole
#

Thats true for a few different windows that have a save button

#

No idea why, but at least its consistent

cosmic prairie
#

if you want it orange why not multiply the noise with the texture?

stray basin
#

It's orange in the graphic shader because of position. I just want to add on texture noise and make it move

#

I did it, but it looks weird on the wall with red color

stray basin
cosmic prairie
#

ah you had me confused with the similar colors, thought you wanted an actual orange wall xD

cosmic prairie
#

would be way better if you baked seamless noise tho and used triplanar sampling

stray basin
#

Oh okay I'll try

cosmic prairie
#

this makes seamless noise if you want it optimized

stray basin
#

Thx

cyan pulsar
#

guys what shader makes visuals smoother

#

but doesnt make the game too heavy?

dim yoke
#

Are you looking for shader to replace every shader in your game with or post processing shader?

grizzled bolt
#

smoother
how about one that forces the blurriest LOD level
Guaranteed not heavy UnityChanLOL

dim yoke
#

Smaller render scale is also guaranteed not too sharp

woeful breach
#

im trying to make a custom shader node and i get this error that tells me smth about smth missing at line 174 but my shader is only 13 lines long

royal widget
#

Is it possible to make shaders in Shader Graph, build them, and use them in Unity 2017.2.5 or under?

#

Reason is because we have a project which is built with 5.6.7 and we were only able to upgrade up to Unity 2017.2.5. We want to build make new shaders but none of us know how to program in ShaderLab

olive aspen
# amber saffron Either do a regular shader and apply it to a quad that is close to the camera (y...

I have watched this tutorial, hit play and it did not work:
https://youtube.com/watch?v=77Lc43yTREo&si=EnSIkaIECMiOmarE

βœ… Get the Project files and Utilities at https://unitycodemonkey.com/video.php?v=77Lc43yTREo
Let's learn how to make Awesome Custom Post Processing Effects!
πŸ‘‡
🌍 Get Code Monkey on Steam!
πŸ‘ Interactive Tutorials, Complete Games and More!
βœ… Add to your Wishlist! πŸ‘‰ https://store.steampowered.com/app/1294220/

This is how we can create Custom Post P...

β–Ά Play video
#

Please someone help

pine arch
#

I'm using Shader graph v12 (Feb 2023) but i don't see any "color header" on my nodes, anyone knows if it's something i have to enable somewhere ? I can't find any option about it in Project Settings / ShaderGraph

regal stag
pine arch
#

oooh ! nice ! thanks πŸ˜ƒ

regal stag
regal stag
royal widget
#

Dang it, take to learn some shaderlab

thin crater
#

Hello! I've spent the past two days playing around with this code:

#

It's a hlsl code that creates an uniform lighting for a toon shader. The lighting ramp is applied in another shader graph, it's not there

#

The problem is when a light is nearby another and it has a lower intensity than the first one

#

it has a higher diffuse (and a lower luminosity) so it creates a "bubble" of low intensity light 😦

#

I've spent many hours trying to fix that, I tried to sum all the lights, to set a limit of intensity and many more solutions, but everything fixed some problems and introduced others T.T

regal stag
simple violet
#

Is there a way to blit through code in urp without the need for render features

simple violet
#

Oh cool, just want a fullscreen blit

thin crater
regal stag
thin crater
#

but didn't fix negative lighting

regal stag
#

Maybe you need a saturate somewhere? I'm not sure where the negative part is coming from

thin crater
#

the light color gets selected via diffuse, and when a light with lower intensity has a higher diffuse, it is used instead of the brighter one

#

Also summing all lights creates this effect:

#

every object that touches the range is illuminated (so a huge chunk is completely light up) and lights intensity influence each other 😦

#

It seems like summing lights by color only if their diffuse is greater than 0 is working... but at this point I've had so many failures when it seems it was working that I don't know it anymore T.T

olive aspen
regal stag
olive aspen
#

Hopefully that works

#

I wish I could understand this on a fundamental level but

#

oh well

regal stag
olive aspen
#

oh my god

#

is 2022 stable enough for that?

regal stag
#

I haven't used it much so not sure

olive aspen
#

hmm alright thank you very much

olive aspen
regal stag
# olive aspen For some reason the transparency doesn't appear in the shader...
  • Surface Type is set to Opaque
  • Would need to Split colour property, connect A output to Alpha port on master

Though still not sure if transparency really works with blits. The usual way is to sample the source texture & use a Lerp.
(to obtain source texture can use _MainTex reference for older versions, or _BlitTexture in 2022+ but there's also a URP Sample Buffer node)

olive aspen
#

Btw what do you recommend to learn shaders from the ground up?

#

I have basically zero experience except maybe some stuff on blender

regal stag
formal depot
#

Hey guys, do you have a tutorial or something else to be able to have an "additive blending" shader and have it work on URP?

grand jolt
#

how do I make the noise texture kind of average out into 0.5 (gray) depending on a value

#

like

#

as you raise the value it becomes more and more uniform

#

like decreasing the strength in a sense

#

and does someone know why this doesn't work on a plane

#

(it just makes it invisible

shy fiber
#

Or is there any other way to remove tiling in shader graph?

cosmic prairie
#

the vertices are all at position values now between 0 and 1 like your noise

#

add noise to the position(object space) and plug that into the position in the vertex output

grand jolt
#

or is it just visual

#

if it is, then how can I make it affect the physics as well

royal hollow
#

Howdy folks. In unity 2022.1 using URP, generally speaking does the number of Currently Tracked shaders and variants from the Project Settings->Graphics tab affect performance on slow systems/mobile in any significant way? Or is it only which shaders are being actively displayed simultaneously that counts?

meager pelican
# royal hollow Howdy folks. In unity 2022.1 using URP, generally speaking does the number of C...

It's about the latter, I'd suppose. As those are context switches. Of course they have to be loaded from a file, but there's a cache of them on the CPU side IIRC.
The total # of variants impacts build time and file size more than execution speed. Of course a large array of variants might slightly slow disk access to various individual ones, but I doubt there's much impact...unused variants are just that...unused.

royal hollow
#

Ok. For PC I have one set of Shaders and for Mobile/Slow I have another, and I didn't know if it made sense to try and further optimize by completely eliminating the unused ones.

#

Some of these older Adreno CPUs have the computing power of a blade of grass, and I'm still learning the ropes of it all πŸ™‚

meager pelican
# grand jolt if it is, then how can I make it affect the physics as well

You practically can't, really. Assuming you mean CPU physics. It's probably theoretically possible, with a lot of hoop jumping, but the easier way is to modify the mesh on the CPU side and recalc the colliders. It depends on the use case. Generally, think about the GPU as the destination of data, not the source of it, from the CPU side's perspective. There ARE ways to get data back from the GPU, but they're generally considered SLOW.

royal hollow
#

Many optimization tutorials talk of using "mobile shaders" for best performance, but I've never seen those using URP 2D in this version. I assume its either for 3D or older versions of Unity? Is the Sprite-Unlit and Sprite-Default-Lit the "fast" materials for this version? I've made my own advanced shadergraph based materials for PC, and am avoiding shadergraph for mobile. But it is unclear if Shader-Lit-Default is sufficiently optimized for basic stuff on these older platforms.

meager pelican
royal hollow
#

IMO the documentation and videos are a bit of a mess for a newbie like myself, as things changed significantly (both in terms of names and location) going from 2019->2022, and 2D is different than 3D. I don't see any kind of Vertex shaders or mobile shaders defined anywhere in this URP 2D project.

cosmic prairie
# grand jolt or is it just visual

"visual" - but a more accurate explanation would be, the data you are getting is only temporary (live for a fraction of a frame) and is only on the GPU. For physics you would need to bake an actual mesh, which you could do efficiently in burst compiled jobs or compute shaders

meager pelican
royal hollow
#

:nod:

grand jolt
#

so it'd just be getting the result that goes into position and displacing the mesh on the cpu as well

light onyx
#

Hi, does anyone know how can I access vertex id in a surface shader?

clever mango
#

Hi all, I just discovered a difference of data using the exact same UV node in ShaderGraph, depending of the URP 2D and URP 3D templates

grizzled bolt
clever mango
#

Oh indeed thanks @grizzled bolt ! The color space is by default Gamma in 2D URP template

steady reef
#

Why does the same material act different on two separate meshes?

#

I'm using a shader with a _Coverage parameter. It makes the color change by increasing it's surface area.

grizzled bolt
# steady reef

You're using UV coordinates which depend on how the mesh is UV mapped

steady reef
#

It wasn't unwrapped

#

Yea, now it works. Thanks.

atomic glade
#

Does anyone have any resources on how to convert an HLSL shader from built in to URP? The shader doesn't seem particularly involved and I'd like to try to salvage an asset I quite like by converting it

grizzled bolt
lyric vortex
#

Hello I'm trying to create a procedurale skybox using shader graph. I have problem with texture UV. This is exactly the same problem than this guy: https://forum.unity.com/threads/having-some-problem-with-the-skybox-uv-on-shadergraph.1103827/
Do you know how to solve this problem ?

regal stag
lyric vortex
distant dirge
#

any ideas why I am getting such bad banding during my nighttime using my skybox shader?

#

even more aparent after i made my clouds look reasonable during the day and sunset

#

and it looks fine during the day

distant dirge
#

im using URP btw

wooden ermine
#

can you not modify the UVS of a URP unlit Sprite?

distant dirge
tacit parcel
tacit parcel
#

then what is it?

distant dirge
#

a shader

tacit parcel
#

what kind of shader?

distant dirge
#

uh its a shadergraph i can send screenshots rq

#

its unlit

#

also im using ACES tonemapping and HDR is enabled

#

and linear color space

tacit parcel
#

try disabling those (although its unlikely HDR is causing those banding)

wooden ermine
distant dirge
tacit parcel
#

also check your shader if it's using full float or just half

distant dirge
wooden ermine
distant dirge
#

uh ok i dont know whwat info to ask for but as long as that texture IS the one in your shader it should worjk

#

well at least in terms of import settings

wooden ermine
#

yea i'm super confused here

distant dirge
#

the results are in, still insanely horrible banding @tacit parcel

#

incoming screenshots of shaders holdo n

#

this is how im rendering my sun (it also doubles as moon)

#

that feeds into the B output of this multiply

#

this is the subgraph that blends my skybox colors together

#

(ofc it is using defaults rn so it wont match what is in the image)

#

and my clouds shader

#

hopefully these are still reasonably readable

#

btw the smoothstep in my clouds is because they look horrible without it, way too many clouds

#

so i smoothstep to widen the gap between clouds

tacit parcel
#

I'd say you can try to plug those nodes to output step by step and check where does the banding starts showing

distant dirge
#

ok, is there a reason it would only be during nighttime?

tacit parcel
#

not a clue sorry πŸ˜…

distant dirge
#

ok with just skybox blend it still bands horribly

#

with just my clouds it looks fine

tacit parcel
#

πŸ€” really? So, even a simple gradient still result in banding?

distant dirge
#

and clouds + moon/sun no band

#

the clouds look ugly tho once i turn on skybox because of the banding im assuming

distant dirge
tacit parcel
#

I dont know about the banding, but maybe you can add dithering to make it less visible
But still looks more like a hack though XD

tacit parcel
distant dirge
#

I just want it to work lol

#

That banding is so weird

tacit parcel
#

Maybe you can check how default skybox works
Or if it suffers the same banding at night too

distant dirge
#

Idk that the default HAS night

tacit parcel
meager pelican
#

Just a thought (You may have already turned off tone mapping) but when you start getting values approaching floating point zero, and then apply tone mapping or even do linear to gamma conversion, you can get banding IIUC.

#

I'd like to see you try a sky gradient from 0 to 1 rgb and see if you get banding across it.

safe girder
#

Hey guys, is it possible to add sub surface scattering in unity to the default rendering pipeline (neither URP nor HDRP)?

distant dirge
meager pelican
#

Yeah, OK. So more color-resolution = less banding.

#

Floating point resolution issues, I assume.

distant dirge
#

grr how to doubles in shader !!!

meager pelican
#

Post processing doesn't seem to be the main thing, nor linear to gamma.

distant dirge
#

yeah

meager pelican
# distant dirge grr how to doubles in shader !!!

See the double data type for floats.
IIUC you can create
double2 foo;
Which would have foo.x and foo.y. Or for colors a double3 or double4. You can't really pass them between stages though, but you can use them in calcs. Warning, likely expensive in terms of cycles.

distant dirge
#

shader graph

#

man

meager pelican
#

Another thing you can do is multiply your floats by 1000 or something. do all the math. And then divide by 1000 at the end.

vocal narwhal
#

I tend to just add some noise, generally blue noise to solve banding problems

distant dirge
low lichen
#

@distant dirge There's something weird happening in your shader. Color picking the colors in the banding shows it jumps more than just 1 shade.

#

(ignore the additional banding in the GIF compression)

distant dirge
low lichen
#

Banding is something that happens because there's only so many colors your screen can show, but your shader isn't using all the shades of grey available to it. It jumps from (7,7,7) to (10,10,10) to (13,13,13).

vocal narwhal
low lichen
#

So it's as if you're using half precision floats, but that shouldn't be possible on a desktop GPU, as far as I know.

low lichen
distant dirge
#

not half

vocal narwhal
#

Blue noise can help hide all sorts of banding, but whether it's enough for that there... no idea πŸ˜›

distant dirge
#

this is so painful

low lichen
#

@distant dirge Does it look like this in-game or does it look worse in this screenshot?

#

Like, if you count the individual bands

vocal narwhal
#

Are you sampling a texture here or something? The banding does look quite severe

distant dirge
#

last time it was like that yeah

distant dirge
#

hmmm even during the day there is some banding

#

hard to see tho

meager pelican
# distant dirge no

Are you using a render texture somewhere that you created? If so what is the format?

distant dirge
#

no

#

i mean i have a minimap but that is not rendering my skybox

low lichen
#

I see you're using a Power node in your graph. I feel like that could cause imprecision if you're taking a small range of values and increasing the range.

meager pelican
#

Yeah, I meant for the skybox.

polar granite
#

can anyone tell a rookie like me why I cant add the smoothness block note to the fragment? clicking on it doesnt do anything

distant dirge
#

more demonstration of the banding

#

@low lichen can you check the shades on this one

low lichen
distant dirge
#

tbf i want my night to be dark so its not super surprising that its banding i think, it goes from 20/255 to 0/255

low lichen
#

Which could be explained by the Power node, because it's stretching the outer parts more.

#

I think if you want to avoid the precision issues with the Power node, you will have to follow @meager pelican's advice to multiply the value with a high value, then use the Power node on it, then divide down again.

distant dirge
#

setting power node input to 1

#

i probably dont need it

#

i was just following a tutorial

regal stag
meager pelican
polar granite
low lichen
#

@distant dirge I recreated your shader from the graph screenshot you posted and I'm not able to recreate the same banding you're seeing.
There's still banding, but just from 24-bit color banding.

#

Can you screenshot the property values you're using?

vocal narwhal
#

It's probably post effects and perhaps the project's color space contributing to the issue

distant dirge
#

its linear color space

#

my only post effects are exposure at about 0.2 (its also based on game settings), and ACES tonemapping

#

and i am using HDR

distant dirge
#

these are my night settings

#

first is 0,0,0 and second is 20,20,20

#

the nadir is just arbitrary since the player never sees it

meager pelican
distant dirge
#

turning off all post makes it worse because its brighter lol

meager pelican
#

Yeah, but you have to isolate the problem. To know what you're looking at.

#

That is worse, lol. But it might tell you something about the calcs

gilded ridge
#

Anyone knows how to make this shader work on a particle system material?

#

I tried everything and still couldn't figure it out

distant dirge
#

@meager pelican btw what am i even supposed to multiply?

distant dirge
#

im gonna try out gamma again rq

#

since its the default

#

well now its just pitch black

distant dirge
#

back to linear ig

#

btw in editor banding looks like this

#

ok ok ok this one is NO POST game view

#

this one is scene view

#

still has banding but id argue this is much more reasonable to dither with noise

#

@low lichen if you are still here can you check the differences on scene view and game view in this version

low lichen
distant dirge
#

I turned off all post

#

Afaik at least

#

I have one volume and its global

#

So i turned it off

#

Maybe there is some weird thing in my renderer asset breaking stuff

#

If i create a new one will settings be the defaults?

prime bison
#

I have made noise, but I have some questions

#

How may I convert the 2D texture that is generated in Shader Graph trough Worley-Perlin noise, into something 3D?

#

Another thing is, how may I create a custom ray-marching algorithm for rendering this noise as volumetric clouds in Shader Graph?

lunar valley
#

If you want to make a rayMarching shader I would advice not to use shader graf. Hlsl is better for things like that. Also there are many 3D perlin noise implementations online you can have a look at :)

distant dirge
regal stag
#

You can still use shadergraph, but for raymarching you'd need a Custom Function node as you'd need a loop which can't be done in the graph itself

distant dirge
#

interesting

thin crater
#

Hi, I'm calculating additional light with this function. I'm using Forward+, currently got about 8 lights in my scene. The game crashes when I press start, saying this:

#

It seems like the workload is too much, but switching to Deferred or Forward, with the same amount of lights, stops the crashes.

#

That's a problem because I need many lights on my game, way more than 8, and if Forward+ can't even handle the same amount of lights that Forward or Deferred can, that's pointless...
Any way to fix it? maybe I'm doing something wrong in the loop?

distant dirge
#

i think this looks ok now, i just recreated my renderer, now to reset settings to the old one until it breaks

#

oh yeah image compression messes this up as well, looks reasonable in the game but fairly bad still here

distant dirge
#

OHH ok ok i found it, I had render scale set to 2, and that made the horrible banding i was having @low lichen @meager pelican @vocal narwhal

serene tendon
#

Does someone know how to make an object to have emissive edges?

#

Should I do it with shaders?

tame topaz
#

That's not an easy thing to answer. If you want it outlined always, then you would need to do some screen shaders (there are outline shaders on the store that you might be able to use, like FlatKit), that also hook into post processing.

If you want it on the edge of the actual model, then you would have to UV your model such that you can give a separate emissive material to. Or find something on the store that might work for you: https://assetstore.unity.com/packages/vfx/shaders/chroma-easy-pro-shaders-231313

fleet anvil
#

How do i create a shader? I cant find it

distant dirge
fleet anvil
distant dirge
#

are you on URP

#

or hdrp

fleet anvil
#

this one?

distant dirge
#

yep

#

it should be under create, shaders shader graph

#

something

fleet anvil
#

which?

distant dirge
#

whichever?

fleet anvil
#

no diff?

distant dirge
#

there is a difference

#

quite a bigo ne

fleet anvil
bitter lintel
#

Is there a way to shift a part of a UV using ShaderGraph? Imagine a screen that looks like this
123 123
456 -> 645
789 788

fleet anvil
distant dirge
#

like when you under water

#

in the surface of water

#

what

#

and do you want the water to be affected by light if its the first one

#

second one****

#

sorry

fleet anvil
distant dirge
#

by googling?

muted pond
#

Hey!
Anybody knows how to apply the Material Override component? I read a lot and saw videos about it but just can't find it when using Add Component ? Has it already been removed again or what is happening?

distant dirge
#

are you using DOTS?

tropic crow
#

Hello! I might be missing something obvious, but is there no way to make a Depth Mask in URP? I just want to hide what is behind an object. I have tried several shaders found on forums but to no avail... And even with a simple shader setting ColorMask 0, I do not get correct results

somber slate
#

is it possible to toggle zwrite for a shader from a script? i have a transparency toggle to change the opacity of the object, but zwrite stays the same, so the object becomes transparent but still blocks the objects behind it.

#

never mind, i found a workaround

soft harness
#
        {
            float theta = v.vertex.z * 0.1f; 
            v.vertex.x = v.vertex.x * cos(theta) - v.vertex.y * sin(theta);
            v.vertex.y = v.vertex.x * sin(theta) + v.vertex.y * cos(theta);
        }```
#

this is giving some weird results, looking for a more "spiral corridor" type thing

muted pond
# distant dirge are you using DOTS?

no... is that relevant? Is that Component a part of the DOTS package? Or do I have to go completely with the DOTS paradigm to make this work? I thought it's just a simple standalone component without any dependency to a large package πŸ€”

amber saffron
hollow wolf
# fleet anvil which?

lit is well, if you want your mats to sort of glow or have some reflection using metallic and smooth
unlit, well the opposite of lit
ofc there's many difference other than that you can google it if you want. And if you want to create water to have reflection then use lit, but if you just want simple water without any reflection then just use unlit

#

note: URP doesnt have default SSR (screen space reflection) you can use Kmirror plugin in github instead
(i mean you can use reflection prob and set it to realtime, but the reflection is really weird sometime)

thin crater
# thin crater

Anyone has any idea? T.T I tried optimizing the code a bit but it hasn't changed anything 😦

sacred stratus
#

Does hlsl have something like #pragma once?

amber saffron
sacred stratus
#

okay I have following issue I wrote a math .cginc file with some basic math function for hlsl but I get the error Redefinition of ....

amber saffron
sacred stratus
#
Shader error in 'Unlit/LineEstimation': redefinition of 'Lerp' at Assets/Shaders/HLSLMath.cginc(1) (on d3d11)
amber saffron
#

I'd avoid using the same term, even if the case is different

sacred stratus
#

yes this happens when I have for example
File A //Has a function called Lerp
File B #include FileA
File C #include FileA
File D #include FileB, #include FileC

#

therefore I need some kind of #pragma once, which tells the compiler to check if the file is being included multiple times at least that s what it does in cpp

amber saffron
#

Okay, I see.
We have this in a lot of places in our include files and circumvent it by using defines like this :

#ifndef MyFileIncluded
#define MyFileIncluded

Code here

#endif // MyFileIncluded

So you can include this file anywhere you want, and the code will be included only once

vocal narwhal
#

why does File D need to include B if it's already included through C?

sacred stratus
#

sorry, both B and C include A

thin crater
# amber saffron Sorry, haven't tried custom lighting with forward+ yet ( <@357936113983291393> m...
GitHub

Unity Graphics - Including Scriptable Render Pipeline - Graphics/Lighting.hlsl at 0cca56cfa8607ef30aa38e64bad73fd9c593d633 Β· Unity-Technologies/Graphics

#

and it does, with small amount of lights

halcyon plank
#

does anyone know a good video for making a Auto Terrain material based off height using Shader Graph

thin crater
#

The custom function already has 3 input, I'd need other 10 inputs to make it work

dire ravine
#

How can I sample the screens texture in a shader graph?

halcyon plank
#

idk if you can in shader graph but i may be wrong

simple violet
#

Scene color node

halcyon plank
#

is that what that does

simple violet
#

idk

stone walrus
#

Hello everyone! I am new here, I have a question.. why does the main preview stop playing? I cant get it to refresh

#

it stays in gray and still

halcyon plank
#

does it still work in the scene

stone walrus
#

havent tried it yet, I am learning about shaders right now. but I cant get the main preview to refresh the new changes I make in there

halcyon plank
#

do you have a time node

stone walrus
#

I do yeah

halcyon plank
#

i couldnt tell you really, that weird

#

i mean as long as it works in the scene it should be fine

stone walrus
#

okok will try it in the scene, thank you for answering πŸ™‚

distant dirge
halcyon plank
#

or ig you can call its procedural terrain painting using shader graph

polar granite
#

Does anyone know why my alpha channel is not working in amplify shader?

halcyon plank
#

a semen shader?

polar granite
#

I dont know that word

#

Does anyone know why my alpha channel is not working?

halcyon plank
#

Oh block it out LOL, well what exactly are you trying to do

polar granite
#

Was just testing to change it

#

Also is not working when I change the surface to transparant

polar granite
halcyon plank
#

well you need to have a color that can change opacity

#

you need a HDR color

#

i belive

polar granite
#

the dissolve texture is black and white, no?

#

how do I convert the texture to hdr?

halcyon plank
#

should be a mode button

#

but converting the texture itself you cant

polar granite
#

Youre right about the HDR color. So how can I use a mask texture for alpha?

#

If it wont take the input

halcyon plank
#

you need alpha clipping enabled with transparency i do believe

polar granite
#

hm, I dont see such option

halcyon plank
#

the alpha clip threshold

#

you got to make a value for it if im not mistaken

#

same with the alpha

polar granite
#

Ive already set it to a slider value from 1 - 0

halcyon plank
#

let me make a shader rq

thin crater
halcyon plank
#

@polar granite Thats weird mine worked just fine

polar granite
#

with amplify shader editor?

#

Did you try universal/lit?

halcyon plank
#

oh your using amplify

polar granite
halcyon plank
#

im dumb, no this was wiht just the regular shader graph

polar granite
#

So you think its a amplify limitation? that would be so weird since its so featureful

halcyon plank
#

i doubt it probably just hidden in plain sight

polar granite
#

maybe this!

halcyon plank
#

oh probably

polar granite
#

damnit, didnt do it

#

:p

#

maybe some other setting in there

halcyon plank
#

see about the mode setting up top

amber saffron
#

Haven't working with amplify for a while, but could it be that the surface type (opque/transparent) is overriden at the material level ?

halcyon plank
#

or the type

polar granite
#

I found it!

halcyon plank
#

nice

polar granite
#

has to set the default texture name

halcyon plank
#

bruh

polar granite
#

Thanks for the help! Im sure the HDR setting was also important

halcyon plank
#

Got to love it man

polar granite
# halcyon plank bruh

Well I can see the texture in the nodes! I had no idea you had to set the default name as well

halcyon plank
#

@polar granite ik fr what the hell

polar granite
#

Thanks again

halcyon plank
#

No problem

polar granite
#

Ill be back to ... work again!

grizzled bolt
halcyon plank
#

oh i didnt know that

#

the more you know

digital kraken
#

hi guys this isnt neccessarily a shader issue but cant find right channel! If i drag and drop a material onto an object, how do i remove that so that the object goes back to using the materials specified on the imports "materials" tab here :

thin crater
#

Hi, has anyone any idea where this variable has been declared in the URP code? URP_FP_DIRECTIONAL_LIGHTS_COUNT

#

I need to do this, but not for directional lights - so for the lights count

distant dirge
thin crater
#

sadly with Forward+ GetAdditionalLightsCount(); doesn't work

#

and every example that I've found uses URP_FP_DIRECTIONAL_LIGHTS_COUNT, which is used to calculate Forward+ lighting per directional light, and not additional ones

regal stag
thin crater
#

Also, the first loop works, if I set a static number for the light count

#

but since the number most likely exceeds the light count, bad behaviour happens

#

as an example, lights stays on even when they're disabled

regal stag
#

It seems with forward+ you don't need the light count, as they're in "clusters" and it uses a while loop. But I don't fully understand it to help.

#define LIGHT_LOOP_BEGIN(lightCount) { \
    uint lightIndex; \
    ClusterIterator _urp_internal_clusterIterator = ClusterInit(inputData.normalizedScreenSpaceUV, inputData.positionWS, 0); \
    [loop] while (ClusterNext(_urp_internal_clusterIterator, lightIndex)) { \
        lightIndex += URP_FP_DIRECTIONAL_LIGHTS_COUNT; \
        FORWARD_PLUS_SUBTRACTIVE_LIGHT_CHECK
    #define LIGHT_LOOP_END } }
#

It's based on that normalizedScreenSpaceUV, so maybe that's what is wrong 🀷

thin crater
#

uh...well setting it to ScreenPosition seemed to be the only thing that worked correctly with the shader

regal stag
thin crater
#

yup

regal stag
#

I assume calculating it from the clipPos after perspective divide. But the usual way Screen Position is handled is with ComputeScreenPos in the vertex stage. I guess this saves an interpolator but it's a bit confusing.

thin crater
#

and if I recall correctly, positionCS can be calculated like this>

#

right?

regal stag
#

Afaik yeah

thin crater
#

but when I input it in my function as a float3, and use it in the GetNormalizedScreenSpaceUV, the lights behave in a weird way: they are shown not when you can see them, but when the camera is in the light's range

#

as if the camera was an object

#

that needs to be light up

regal stag
#

Okayy, but it doesn't crash?

thin crater
#

lemme check..

#

yes T.T

regal stag
#

Guess it's caused by something else then

#

Does the crash occur without using your shader? What about with the URP/Lit?

thin crater
#

well, there are many materials in my scene, but I think it would not crash... in fact, it doesn't even crash in the menu with 2x more lights.

#

trying it with Lit would mean taking half an hour to modify every material

#

I can try with threes and the terrain (the main objects, wayyy more common than the others), wait a minute

regal stag
#

Maybe you can test in a smaller scene with only this shader/material with the forward+ lights setup. You need to be sure this crash/error is even caused by that

#

And if you test it and it crashes even with the URP/Lit, then there's a problem with URP itself and you should make a bug report

thin crater
#

In the game, I've got thousands of objects and about 8 lights (loaded in my save). But the light touch at max 50 objects

thin crater
#

Ok I found a way to test better what's making the game crash. I'll brb with more data.

sharp tulip
#

Hello

#

I'm looking for a good outline glow shader. Does anyone know a good tutorial?

fleet anvil
thorn tapir
#

Hey Im confused about something:
How can I create a fragment shader graph?? I dont see an option for fragment or vertex sahder when I go to create one

also, what the union node? I dont seem to have that either

#

I loo up a guide on every node in unity shader graph, and union is not there

#

but its in this persons video

shadow locust
thorn tapir
#

bah, I'm on the latest 2019 release, and I thinkk updating further would entirely break my project

shadow locust
#

2019 is pretty old

#

shader graph wasn't that evolved yet back then

thorn tapir
#

well shit

shadow locust
#

Also I think it depends on which type of graph you're making

thorn tapir
#

I need a fragment shader for what I'm trying to do

#

I tried every type of graph

shadow locust
#

Which version of shadergraph is it

#

and which type of graph are you using

thorn tapir
#

where do I find the shadergraph version?

amber saffron
#

Shadergraph will generate fragment and vertex shader for you

#

In the "output stack", you have two blocks, one for vertex and one for fragment / surface

amber saffron
#

Ah, hum, yes, 2019 might not have it πŸ˜…
Still, it will generate vertex and fragment/surface

shadow locust
#

it's basically a surface shader

thorn tapir
#

I dont need the vertex part at all, just fragment

shadow locust
#

what exactly are you trying to do

thorn tapir
#

make a shader that takes in a render texture of the screen that can only see a particle system.

in that particle system, I have red semi-transparent particles. I want to take the overlaapping portions, and step them to another color depending on how opaque they are

#

which, I have the graph and nodes mostly working for that so far

#

I'm trying to follow along with someones stream where they are doing this effect, but they are using a newer version of unity and shadergraph

#

and I dont know how or if I even can do what the union node is doing

#

which is just overlapping the output of 2 nodes with a top and bottom input

#

I tried a blend node, in screen mode, and this sort of works

#

but it also creates unwanted interactions between the layers

#

I dont want them blended, just overlapped

amber saffron
thorn tapir
#

possibly, he doesnt mentioned it anywhere though, as he is explaining the shadergraph

regal stag
#

Don't know about this Union node, but it sounds like you want a Lerp, or Blend (Overwrite mode)

amber saffron
#

Maybe a Max node ? (sdf union)

thorn tapir
#

overwrite doesnt work, it pretty much just deletes one of the inputs

white marsh
#

how do i set the intensity value of a HDR color from a c# script?

#

using .setColor() makes it default to 1

#

nvm i found out

thin crater
#

I'll cut out various parts, trying to find what's wrong with it

distant dirge
#

I'll cut out various parts, trying to find what's wrong with it
this why i like shadergraph
shaders are so complicated and just being able to extremely easily cut stuff out makes solving problems so much easier lol

thin crater
distant dirge
#

that is what debugging is all about

#

πŸ˜„

thin crater
#

Yeah but jeez, usually bugs are something harder and not that low-level dumb

distant dirge
#

nope

#

thats just how bugs go

#

they can be super simple fixes but not super simple finds

hollow wolf
#

If you want to reflect the skybox you can use simple reflection probe

#

If you want the mats look bit shiny then use lit and crank up the the metallic(or smoothness I forgot) value

#

=========
In reflection probe you can choose what obj will show up in the reflection via layer mask

mossy junco
#

I'm writing a ray marching compute shader for iOS, and I need to use the depth texture to occlude stuff

#

It works fine on Windows and Android, but on both my Mac and on iOS the depth texture seems to be in a different format

#

I'm calling Linear01Depth, which supposedly fixes reversed depth texture, so that's prrrrrobably not the problem

tame swan
#

What could be the culprit of a shader not rendering? I've applied it to a material and I can visibly see it on the preview, but it's not rendering on a quad. What gives?

hollow wolf
tame swan
#

It's a normal shader

#

I have tried selecting both in the render direction if that's what you mean

hollow wolf
#

well,if you already doing that then i dont know any other possible solution UnityChanSorry

tame swan
#

It's fully translucent for some reason

#

It's not pink

tidal sluice
#

Hi Gamers, if I want to actually WRITE shaders, is URP basically a dead-end?

#

I see I can write surface shaders, but would that work for 2D textures or post-processing effects?

regal stag
tidal sluice
#

So is there any way at all to write shaders in URP or is it only shadergraph

regal stag
# tidal sluice So is there any way at all to write shaders in URP or is it only shadergraph

Yes, you can still write shaders for URP. Though it is typically easier to use shadergraph, especially for lit shaders. Actually most "unlit" vert/frag shaders even from BiRP might already work still.
Though if you want to support the SRP Batcher (good for batching Mesh Renderers) you need to use the render pipeline ShaderLibrary with HLSLPROGRAM (rather than CGPROGRAM & UnityCG.cginc which is intended for BiRP).
I've got an article which covers most of the basics :
https://www.cyanilux.com/tutorials/urp-shader-code/
Also some templates/examples : https://github.com/Cyanilux/URP_ShaderCodeTemplates
Can also view the shaders URP provides an examples : https://github.com/Unity-Technologies/Graphics/tree/master/Packages/com.unity.render-pipelines.universal/Shaders

tidal sluice
#

That's a big article 😳

regal stag
#

Yep πŸ˜…

tidal sluice
#

So for a 2D project, which rendering pipeline would you recommend and why?

#

I trust your knowledge

regal stag
#

I prefer URP, it has a 2D Renderer + 2D lighting system too which is quite nice. But I typically work in 3D so probably aren't the best to ask.

regal stag
grizzled bolt
simple violet
#

I have a question about windwaker hd's toon shader
It looks like the character has some lighting being processed even in the dark parts
Im assuming this could be using ambient light or maybe light probes?
This has been bothering me for weeks trying to figure out how they give the characters depth

#

Is it possible they combine diffuse lighting with toon shading?

#

Im wondering if simply taking the lit shader and replacing the diffuse function with a toon function would achieve the same effect

regal stag
tidal sluice
#

I feel like most 2d games now probably arent strictly 2d

regal stag
#

If you don't want strictly 2D, you can still use 2D/sprite components in the 3D / Universal Renderer as well. But you don't have access to the 2D lighting features then.

grizzled bolt
grizzled bolt
regal stag
#

Ah yeah :\

tidal sluice
#

It's annoying they don't properly communicate the pros and cons and instead let you truck on and bump into the cons along the way

floral pivot
#

Does anyone know how to use UDIM Textures in unity?
I know unreal supports them, but how would I do it in unity?

kind juniper
floral pivot
kind juniper
#

Also, did you even try to google?

floral pivot
#

Oh alright, I see now

kind juniper
#

There seems to be a plugin/asset implementing substance painter materials in unity.

#

And it's free even.

floral pivot
#

Where can I get it?

#

Sorry if this was a stupid question btw

kind juniper
#

Just Google it. One of the results should be a link to unity asset store.

floral pivot
#

Oh alright

#

Thank you ig

#

yep found it thanks

grand jolt
#

Near the top of a Subshader Pass, I'm defining

            #define GPUI_STRUCT_NAME appdata // the name of your input struct

which is used in a cginc file like so

void gpuiAnimate(inout GPUI_STRUCT_NAME v)

However, upon compilation, the following errors are thrown

Shader error in 'Collapse/Toon': unrecognized identifier 'appdata' at Assets/GPUInstancer-CrowdAnimations/Shaders/Include/GPUICrowdInclude.cginc(18) (on metal)

Compiling Subshader: 0, Pass: Outline, Vertex program

appdata is a struct defined as

struct appdata
            {
                float4 vertex : POSITION;
                float3 normal : NORMAL;
                float4 tangent : TANGENT;

                // GPU Instancer
                float4 texcoord2 : TEXCOORD2;
                float4 texcoord3 : TEXCOORD3;
                UNITY_VERTEX_INPUT_INSTANCE_ID
                //
            };

However, for some reason the cginc file isn't recognizing the struct appdata

#

This is URP btw. Does anyone know where I went wrong? I'm guessing that HLSL has to make a struct "public"?

silent harbor
#

Hello, I'm trying to overlay a sprite onto another sprite that use the bottom's sprite's alpha as a mask. The desired effect can be seen in the preview window

#

The problem is when I put a sprite sheet as the maintex, the scaling is messed up. I'm trying to figure out how to achieve the same effect as using a single sprite, can anyone help?

#

this is what it look like in the editor when using the sprite sheet

#

this is what it should look like

vocal narwhal
#

Surely you want to be using UV1

silent harbor
silent harbor
#

hmm I'm not seeing any changes neither, I have tried plugging random things into it too

vocal narwhal
vocal narwhal
#

There is a Preview Node you can use

silent harbor
#

the bottom sprite is also part of a spritesheet too

vocal narwhal
#

I understand what the issue is, and I have no idea how you can fix it.
I think the way this works is that the UVs that are used for the mesh are generated so they point at the maintex sprite in its spritesheet

#

there are no UVs generated for your other texture, so you can only pull the uvs associated with the main tex

#

which are presumably pointing to that section in your mask

#

so unless your mask tex was in the same place in its spritesheet, this can't work

silent harbor
#

I see

#

I thought the uv for the mask tex is handled by the flipbook

vocal narwhal
#

The flipbook is giving you a window into the original provided UVs

silent harbor
#

I see

vocal narwhal
#

Like if your maintex is at the red square, your flipbook's first index might be at the green square, but seeing as your mask texture probably has nothing to do with the red square in the first place it's nonsense UVs

silent harbor
#

oh ok I can kinda picture it in my head now

vocal narwhal
#

If your masks are always matching your main textures, it's just they're atlasing differently I believe there's a thing called secondary textures where you can get those atlased the same as your first

silent harbor
#

I did come across atlasing when I searched for an answer

#

I will come back to that article

#

thank you for pointing that out

halcyon plank
#

Anyone know a good tutorial to auto pain textures using shader graph to terrain

simple violet
vocal narwhal
tidal sluice
silk sky
#

can somebody help?

#

Here's the graph inspector

#

Its surely some setting here, I tried to detach every one and still didnt rendered

regal stag
# silk sky I found this cool glass shader https://github.com/omid3098/Unity-URP-GlassShade...

It uses the Scene Color / aka camera's Opaque Texture. It's a snapshot of the screen after rendering opaque geometry, so doesn't include transparents yet. When rendering transparent objects they can sample this texture and do stuff like distortions. But it'll never have any transparent objects in.

It's meant to replace the older GrabPass technique which handles multiple screen grabs before rendering the object, which can be expensive.

silk sky
#

Oh ok so from the base its a technique that doesnt work, or at least in this context where I need to render things behind

#

Seems strange tho, cause the video demo looked fine

regal stag
#

It works fine, as long as everything you want to render behind the window is opaque

#

If you haven't already, make sure the Opaque Texture is enabled on the URP asset too.

halcyon plank
#

Does anyone know how you can write shaders in HDRP instead of using shader graph

silk sky
#

it was the opaque texture, thanks

#

I will try to delve into this topic

regal stag
silk sky
#

One last thing, the image behind is now way darker, what causes this behaviour?

regal stag
#

You'd typically use an Unlit graph, or at least put the Scene Color in the Emission on a Lit graph

grand jolt
hazy carbon
#

In URP, what does Raw depth value means, I dragged it in to the color, my object turn black,I think if it is the distance from the camera to the pixel, It should be white

amber saffron
hazy carbon
amber saffron
hazy carbon
#

thanks, It worked

#

@amber saffron I still got some bug here, Only object inside the light circle at the center of the screen show correct value, outside is gray

grave vortex
#

I have been trying to make a simple fog effect in shadergraph with URP, as a sort of introduction to shaders. Currently I have two questions, the first being that the fog seems to flicker a lot at a distance, but if observed closely, also up close, albeit to a lesser extent. This reeks of a precision problem, but if the depth value were somehow off by a small amount and flickering, wouldn't the problem instead appear on the edge of the transition to fog?

My second question has to do with making the fog radial as opposed to the rather menacing "Fog Plane", that currently rotates with the view, I understand this has to do with how I'm using the depth texture (Currently just a scene depth node in eye mode), and that I want it in "Clip space", but I have no idea how to convert to said clip space from eye space (As a third question, what even is eye space exactly?)

#

I'm currently applying the fog effect through sampling the URP render buffer before post processing in a Fullscreen Pass Renderer Feature and lerping to a fog color

hazy carbon
mint berry
#

a nooby question

#

how can i get the unity graph shader

#

when i go to packages

#

i cant find the render pipeline package

lunar valley
# mint berry

you are searching packages in your project, you need to search them in unity registery

lunar valley
mint berry
#

well i found that shader graph is installed

#

but i don't have the options

#

to create one

lunar valley
lunar valley
mint berry
#

well i can create unlit shader

#

now i cant find the shader graph lol

lunar valley
mint berry
#

sec

lunar valley
mint berry
#

no

lunar valley
grave vortex
lunar valley
spring owl
#

Hi! I have some troubles with the shader graph... So, I was messing around with the Shader Graph and I tried to make some water shader. I found out someone who just did what I almost want to achieve but something went wrong and I have no idea what... So basically the water should look something like in the second picture but I my project it looks... (first picture) Also I am leaving an image wit the shader graph if there is someone who can help it would be much appreciated.

regal stag
#

Also check the alpha value of your colour properties

lunar valley
spring owl
#

Thanks for answers! I checked alpha values and it's good and the surface type of the graph is transparent, but how do I enable that Opaque Texture?

mint berry
#

@lunar valley Thanks for the help man πŸ˜„

swift loom
#

So in both fragment and compute shaders I have long time had big issues sampling textures correctly. In my case I have a 3D tile array in C# that I write to a texture as per pixel information. But when I try to read it using something like this:

    c = _texCol3D.SampleLevel(sampler_point_clamp,
        float3(
            tileX / (_texCol3D_Dimensions.x - 0.01),
            tileY / (_texCol3D_Dimensions.y - 0.01),
            tileSheet / (_texCol3D_Dimensions.z - 0.01)
        ),
        0
    );

I have to add - 0.01 to the texture dimensions otherwise it will sample the incorrect texture position. I assume this is because the texture is actually 0 - 0.99 and 1 is the repeat of the texture, but sometimes I get the correct values doing nothing, sometimes doing - 0.01, and sometimes doing - 1, but it feels extremely inconsistent which I assume is caused by texture size affecting precision. What's the correct way to approach this??

lunar valley
grave vortex
#

Alright then

#

It's not that the shader doesn't work, but as shown in the video, there are issues with the fog not being circular and with distance based flickering

regal stag
swift loom
#

i'll try load

regal stag
# grave vortex

Should try disconnecting some sections to see if you can find which part causes the flickering.

~~The use of the Position node specifically might not be what you intend, as the shader is applied to a fullscreen quad in the renderer feature.

If you want "height fog" for objects in the scene, you'll need to reconstruct the world position from the depth texture first.
I use this : https://www.cyanilux.com/tutorials/depth/#blit-perspective~~

nvm, seems the fullscreen graph is automatically reconstructing the world pos. Didn't know it did that.

grave vortex
regal stag
#

Yeah I just tested, it's not what I expected but nice to know shadergraph is doing the reconstruction for us

#

I would still try each section separately to see if a particular part is causing the flickering

grave vortex
#

Turns out the issue comes to the depth, which must be flickering somehow, though it is in eye space, aka, unity world units, and would have to be flickering back a lot for the fog to dissappear

#

Because position I assume is reconstructed using depth somehow, the position node output flickers too

regal stag
#

Does it flicker if you just output a solid colour?

#

If so, might be something with the renderer feature setup, not the shader itself

grave vortex
#

Nope, definitely depth flickering

#

Huh, that's interesting, mapping that same depth input to 0-1 and moving the camera has no effect, something weirder must be at play

#

no flickering with this at all

#

Turns out flickering is coming from the position node, and that I was confusing some of my tests by leaving post processing on after trying to output something like a depth texture

sharp tulip
#

Hello

thorn tapir
#

Hey, I have a Render Texture from a camera output that I am rendering over the entire screen. Its meant to look at a particle engine, and do some neat shader magic to it to achieve this result
https://streamable.com/happn5

However I have a problem... I currently have the material from the shader on a Mesh Renderer... but I can't get this to interact with my sprite layers... I want it to render behind the player

any idea how to do this, WITHOUT converting the rendertexture to a sprite at runtime (I know how to do this, I'm doing it for a different effect, but its a very costly operation, and actually does not keep up with the framerate)

thorn tapir
#

nevermind, got it working! it renders to a sprite, just needed to change the input from _MainTex to a different secondary texture

ancient drift
#

is there some equivalent to the standard shader in URP/HDRP? There's this model i made using crocotile that needs the cutout mode to allow for transparency on the sprites since transparent mode breaks a lot of the sprite rendering.

grizzled bolt
random stone
#

I am having an issue with a "Wind" shader that I'm trying to apply to tilemaps to have it wave like trees in the wind. The "waving" is working, but the textures are being replaced, or maybe stretched into squares? its not using the tile textures. I will send a picture of my shadergraph, a video of whats happening at the moment, and what the tiles actually are supposed to look like

#

(what the textures are supposed to be)