Advertisement

Latest Shader Activity

hbr3ehreg said:

@Juliean 
Thanks for your reply!
Do you think Uber shader approach is something limited to linear game like Doom? It's has less variants than open world games I guess.

I don't think this really matters, I'd say the main difference there would be in spatial division, world streaming…

4,304 views
Advertisement
klg71
November 18, 2023 12:03 PM
Designing a Dynamic Equipment System in Unity
We want to have exchangeable equipment on our character

The goal is to give our players various items to choose from. For this example, our players will choose a weapon, armor for protection, and boots. We want to visualize these choices on the character.

The imagined system should enable quick equip…

1,791 views
DirectX12 lighting with weird stripes

Maybe this is part of the problem:

float3 va = normalize(float3(size.xy, s21 - s01));
float3 vb = normalize(float3(size.yx, s12 - s10));

float3 localNormal = float3(cross(va, vb) / 2 + 0.5f);

You forgot to normalize the final normal, while normalizing the two tangents isn't needed. So it should be:

f…
2,683 views
Shader float precision error - how to resolve?

jsmithir123 said:

 I am interested in learning a little more about the double intersection count for points that overlap. I am not exactly sure on the details of how you say you solved this previously. Could you expand a little?

Well you can see in the shape below that the scan line passes thoug…

4,653 views

Hi

I'm trying to implement wireframe drawing with hidden line removal. In the geometry shader I make lines from the input triangle. I plan to change the z-value in the geometry shader so that the lines are closer to the camera to avoid stippling (maybe this approach is wrong too). 

I want to do …

2,629 views

To fix z fighting when rendering a wireframe on top of another mesh, you want to change your depth test to something similar to GL_LEQUAL (less than or equal to comparison), instead of the usual GL_LESS. This will make your depth test succeed if the depth is equal (which is the case if you render t…

2,633 views
How to render the scene to a texture (for the purposes of doing a Post Process shader Pass)?

Ok I made it.

My own rendering architecture confused me.

I had to make some adjustments to accommodate offscreen rendering.

What you have to do:

  • all rendering is made offscreen, exactly the same way you did before (same bindings etc.) with the only difference being that now you use a render target that…
6,879 views

JoeJ said: This one seems pretty nice: https://jcgt.org/published/0011/03/05/

That's the most useful one for routine dirt, rocks, etc. All it does is divide the texture into hexes, spin the hexes randomly, fuzz the edges, and recombine. That can be done in a shader. That's enough to break up annoyi…

4,420 views

Thaumaturge said:

But I do ask: how accurate does this have to be? Why not just implement it in the vertex shader, as you already have in mind, and have done with it?

That's what I'll do.

Thanks for the support.

7,556 views
Help me please with resources, tutorials and advices that can help me to implement this shader

JoeJ said:
Not sure (also about the correct term), but if so, you can get this much simpler, and probably more robust as well:

Well, I do want a time component, in order to account for variations in frame-rate. Still, it might be interested to try both, and see which works the better.

JoeJ said:
I gues…

10,949 views

In the end I worked around this as follows:

1) I set  “precision highp float; ” in my shader, so that it uses 32 bit, even on OpenGL ES

2) Then, to improve the performance, I first render to a smaller texture FBO, then scale it up to the screen

5,806 views
enigma_dev
April 18, 2022 12:42 AM
DevBlog 23 - Light Speed VFX, Player Slow Motion, and Asteroids



The Space Jump effect is pretty simple when looking at its individual components.

Previously I created a 3D star field for the environmental rendering.

I use the 3D locations of these stars in the effect.

When the effect starts, I start cranking up the light emitted for each star.

This is done by just …

8,995 views

I have a bmp and I want to texture a mesh with it.I calculated the uvs for the mesh and sent them to vertex shader.I have no idea how to take the data from.bmp file and send it to pixel shader.
 

Bitmap bitmap = new Bitmap(texturePath);

The vertexShader.hlsl:

#pragma pack_matrix( row_major )
cbuff…
3,144 views

Hi,

I wrote a small tessellation shader and I can write to a SSBO (checked using RenderDoc) but reading the data back right away does not seem to work.  If I set the tessellation levels directly, I can see that my code works, but going through the SSBO data does not.

Here is the SSBO:

struct SSBO…

3,638 views
Can I use shader graph in bending shadered game?

Hi,

I'm developing a game with bending shader. The world is curved and I need to use VFX with shader graph such as lightning. There is a screenshot for it.

The obstacle that I selected is seeming below of the actual position cuz of the bending shader but I cannot use my vfx with this bending shader. …

3,701 views

@mjp  I downloaded RenderDoc as per your suggestion and it turns out the buffer was full of random data… I guess this is because CLight was a class and not a struct. I changed it to a struct and now everything works fine. Thanks for your help!!

17,881 views

@mattstone2728 @joej So i actually managed to solve it. It was related to the precision, but indirectly. When getting to close to the zero Y value, and as the algorithm is in KM, the distances start to get very small and thus getting into precision errors. The solution was to limit the position of …

4,963 views
Problem with normals (DirectX 11)

@noxil @johnnycode  The problem was indeed with the mesh importing. The tutorial I used to load meshes recalculated the normal by using the tangent and binormal vectors. I have changed it to use the normal data from the mesh file instead. The normals now appear smooth. Thanks for your help!

5,912 views

wonka007 said:
I try to make them as generic as possible.

Perhaps try to make them as generic as needed.

6,273 views

GPU is a state machine, only calls that goes operating on it- are the state changing ones, dx11 contains at least a few utility functions which are not GPU calls. Or maybe none, who knows, I do not contain all of it and I have used only GPU calls of the API.

4,930 views
gregouar
September 11, 2020 03:06 PM
Approximated contact shadows from bent normals

Hi everyone,

Today I want to talk about rendering. Last time, I implemented some random dungeons generation. Since the map can get a bit labyrinthic, I wanted to find a way to help the players orientate themselves. So I decided to add torches that auto-ignite when you get close to them;

But it means …

7,896 views
khawk
January 06, 2020 04:08 PM
Reallusion Releases New Digital Human Shader

Creating realistic digital humans for real-time 3D animation is now possible with Reallusion’s new Digital Human Shader. A complete set of shaders for skin, eyes, teeth, and hair are available, along with SSS(Sub -Surface Scattering) and Micro Normal updates for iClone 7.7 and 3D character creation…

2,991 views
Advertisement
Advertisement