Advertisement

Latest GLSL Activity

Shadow mapping issue in Vulkan with orthographic projection

@Aressera Thanks for the reply! I've tried playing with the near and far for the light but doesn't seem to improve the situation at all. I really have no idea what's causing the shadow on top of the sphere. 

1,619 views
Advertisement

I have a small issue with my shaders. Sorry if it is not the right place for this question. In general, the essence is that for my application on dx12, I have shaders in glsl (I'm too lazy to rewrite them because there are many, and they are not only for dx12), and I compile them into hlsl using sp…

2,864 views

Thank you for the reply and giving an helpful and insightful explanation! 

4,756 views
Path tracing in Vulkan

The fog is not cooperating with me LOL

Looks good, except for some glitches.

So, to get around the glitches, I'm re-doing the fog from scratch.

50,310 views
8Observer8
July 24, 2023 02:11 PM
Sprite in SFML style using FreeTexturePacker, pure WebGL 1.0, and JavaScript

This example loads sprites from the FreeTexturePacker sprite sheet and uses a sprite in SFML style

Playgrounds:

2,447 views

Yeah, the fog takes no time at all. It's the refraction and reflection that are so GPU intensive.

I do randomization for shadows and glossy reflections. ?

3,647 views
Having trouble rendering entire sphere

For future viewers, this is how my sphere looks like now, also, here are the correct coordinates

    float vertices[] = {
        //top-north-east
         0.0f, 1.0f,  0.0f,
         0.0f,  0.0f,  1.0f,
         1.0f,  0.0f,  0.0f,

        //top-north-west
         0.0f,  1.0f,  0.0f,
        -1.0…
4,030 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,605 views

JoeJ said:

Your game looks like you might use BSP trees for the levels?

Currently I am not. I'm loading the meshes in and drawing each one (with some simple batching of unique meshes). Then for collision I create individual mesh objects within bullet physics and use bullet's collision functionality t…

6,078 views

Fixed Link in fist post.


New Release: 
VERSION 1.1 @8.11.2022
Changes:

  • Autodetect of all GLSL shader stages
  • Support for HLSL added for files with *.<stage>.hlsl file extension on Vulkan 140. Requires a few manual settings since it only partially compares the extension. Did not figure out how …
5,190 views

gl_FragDepth is a value output by the fragment shader, it has whatever value you calculate for it. 

Are you asking what the value will be that's used for normally used depth testing and eventually stored in the depth buffer if you don't output gl_FragDepth? There can potentially be many fragmen…

4,785 views

Job interview tests and school homework are not allowed here. You need to solve job or school tests on your own. Thread locked.

3,006 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,890 views

JoeJ said:
Maybe dtex needs to made from the inverse of TBN matrix, so it follows view direction in local texture space.

THIS!!! OMG THIS! You were correct indeed. Using the inverse of the TBN matrix in the parallax calculation appears to have corrected the issue. You are my hero ?

7,129 views

dpadam450 said:
Depends what techniques but yes you can use the last frame and the last frames camera matrix to take a texel from current frame into where it was rendered in the previous frame and use that coordinate to lookup where the texel would have been rendered in the prior frame.

I wasn't sugg…

5,268 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,777 views
Best way to draw outlines for a toon shader: Geometry shader? During post processing? Something else?

hplus0603 said:
Based on depth buffer (texture) reads. …

Based on ID buffer (stencil, or separate color channel) reads. …

If I'm not much mistaken, these two techniques can be used to reinforce each other--the former capturing outlines within an object (e.g. a character's arm extended across their che…

7,601 views

@Gotanod , @hplus0603  thanks! it worked when i used GLint values and glUniform1iv

5,392 views
enigma_dev
April 09, 2022 02:23 PM
DevBlog 22 - Tighten Up The Graphics (Adding HDR, Bloom, Normal Maps, and more) [OpenGL 3.3]



I've refactored the rendering system in my engine.

The old way of rendering was complete in SDR.  

In this update I created a separate off screen framebuffer that everything is rendered to first.

This offscreen framebuffer is a float framebuffer, and can store values outside of the normal [0,1] r…

10,332 views
enigma_dev
March 27, 2022 02:20 PM
DevBlog 20 - Stencil Highlight Targeting, Player AI, and Objective AI

Making the game fun with AI and a useful HUD.

The HUD now has helpful elements like health, energy, and game stats.

But I found the debug lines to the ships that were attacking me, actually made the game more enjoyable.  

So I polished that up and made a real HUD system that has the debug lines. …

7,702 views
enigma_dev
March 21, 2022 12:57 PM
DevBlog 19 - Campaign Screen, Level Loading, and 3D UI



A from-scratch C++ dynamic 3D animating UI system using spatial hash grid!

I've defined my game's main menu using this system.

Buttons are constructed from shared "lasers".  

That is, when we go a screen, the buttons request lasers to make up their shape.

These lasers are requested from a pool, an…

10,986 views

Can anyone guess why this shader is only working from a top down view position (0.0, -1.0, 0.0).

The parallax mapping calculation in the shader below is basically copied directly from learnopengl.com care of Joey Devries and adapted for my first-pass gBuffer shader program.

Video blow which may also …

4,308 views
Shaders for Beginners (with examples in OpenGL and Defold)

I had many problems with understanding shaders, but after getting a grasp - it is so easy, convenient and powerful! I present to you my twisted version of understanding this, hoping it will help other aspiring devs ?

This is my slow path from a total noob to a less-noob-ish shader programmer ? It wi…

11,629 views
Advertisement
Advertisement