8,216 questions
2
votes
2
answers
102
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
3
replies
55
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
28
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
113
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
154
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
40
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
39
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
414
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
323
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
168
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
82
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
169
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 ...
-1
votes
2
answers
155
views
Instead of a texture atlas, dump all images in one buffer
In a texture atlas the individual images are arranged geometrically. The texture atlas itself is an image that can be viewed in any image viewer.
I was wondering if it was possible, to simply dump all ...
1
vote
1
answer
54
views
Does GLSL spec permit cases when PS-input mismatched with VS-output?
On my NVIDIA GPU these 2 shaders work fine:
// VS
#version 450
layout(location = 0) in vec4 inPosition;
layout(location = 0) out struct {
vec2 dummy;
uvec4 variableInStruct;
} testStruct;
void ...
2
votes
0
answers
86
views
How to use canvas.drawVertices with custom fragment shaders simultaneously in Flutter Canvas?
I have a requirement to draw a knitting needle effect image.
I implemented a rope texture shading effect using fragment shader code, but there are over 20,000 ropes. I'm using canvas.drawRect(),to ...