8,209 questions
0
votes
0
answers
65
views
Writing to a buffer of unknown size in a compute shader
I am working on an implementation of marching squares in OpenGL 4.3. The vertices are calculated using a compute shader and written to a buffer, which is read by the vertex shader using programmable ...
-2
votes
0
answers
205
views
Trying to run a basic shader on Visual Studio IDE using Raylib
I'm trying my own tiny shader lang which transpiles to GLSL. I'm using Raylib to handle OpenGL boilerplate.
I cloned vcpkg and ran:
.\vcpkg\bootstrap-vcpkg.bat
vcpkg install raylib:x64-windows
...
0
votes
1
answer
259
views
OpenGL batch renderer shows blank window with clear color and no OpenGL errors
I'm working on a project that I'd like to implement a batch renderer for.
I've tried enabling debug mode and have not been receiving any OpenGL messages let alone errors. I've tried using RenderDoc to ...
2
votes
2
answers
168
views
How to maintain scale when rotating?
I've been messing around with OpenGL/ModernGL in Python/Pygame, and after getting my images rendered to the screen, I have been having issues rotating them.
I'm aware of the order that I need to ...
Advice
0
votes
4
replies
112
views
How to automatically test GLSL shaders?
I am working on a project using GLSL shaders, and I would like to automate testing.
My initial idea was to compare rendered output with a reference image (pixel comparison). However, this seems ...
0
votes
0
answers
33
views
Blender GLTF's gl_InstanceID updates based on instances in view
I have a simple WebGL scene with a bunch of cubes instances created with Blender Geo Nodes and am trying to color them dynamically based on their instance ids.
The problem is, if there are 15 ...
-1
votes
1
answer
126
views
Unable to update float value in GLSL shader from Python
I'm using Python and PYSide6/OpenGL to create a GLSL shader, in this shader I want to have a time component. The boilerplate code for the shader is set up fine, and renders at expected. However I can ...
Best practices
1
vote
1
replies
165
views
How to pass large arbitrary data to opengl shader
I have an array of simulation states that I want to pass to a fragment shader. In this scenario each state element should result in a pixel on the screen.
In order to decide what the color of the ...
Best practices
0
votes
0
replies
47
views
How to display a lot of line_strips efficiently with ModernGL
I need to display many (a lot) 3d trajectories with modernGL.
For now, I chain the trajectories and I create two arrays only (one for all the vertices and one for their colors) that I pass as params ...
-2
votes
1
answer
44
views
Applying texture continuously on the side of an object with shader
In threejs, i'm working on a showerbase project using shader. One of my material got visible mineral veins on it and I noticed when it wrap around the border, the veins are not aligned.
I made a ...
1
vote
1
answer
474
views
Unable to render sprites in batches / instances using SDL3 GPU API and Odin. SSBO is not available to shader
I am new to graphics in general, so I am trying to learn from others.
After drawing a triangle, a quad and then a sprite on top, I have been trying to get a batch of them on screen using instancing.
...
1
vote
1
answer
367
views
Ursina Engine Shaders MacOS
I have freshly installed ursina in a virtual environment. I am trying to set up a basic scene with some lighting:
from ursina import *
class Pivot(Entity):
def update(self):
self....
3
votes
1
answer
180
views
Square not rendered in OpenGL
I'm trying to program a simple game in java using lwjgl and OpenGL but I'm not able to render a square to the window. Can someone help?
The render function in render class is called evert frame and ...
1
vote
1
answer
87
views
LibGDX Shader comes out stretched, if the Viewport world size is not square
First of all, I'm using this library for post-processing in LibGDX: https://github.com/manuelbua/libgdx-contribs
I added a new custom Effect to it by extending Filter and PostProcessorEffect.
It's a ...
1
vote
2
answers
174
views
GLSL shader not showing anything in scene in THREE.js - why?
I'm trying to make my own shader for a THREE.js project I'm working on, and I wanted to make a GLSL shader as part of it for one of the meshes in my scene. However, despite writing very basic code for ...