glsles Questions
3
Solved
There is no inverse command in glsl es 2.0
But I saw that I can 1.0/mat2 . But I fear it'll just divide component wisely. Or not? But if so, is there some trick for this (get 1/det fast)?
3
Solved
Has anyone been successful in using GLSL 3 ES shaders with three.js library?
From what I know it is impossible for latest revision (r68) beacuse one can't even set a directive (which is required, a...
3
Solved
I am trying to write a compact and simple noise function with a strictly FP16 limit.
This is with what I came out so far, but I think somewhere on the operation the number gets too small for fract ...
1
Solved
I'm creating a terrain mesh, and following this SO answer I'm trying to migrate my CPU computed normals to a shader based version, in order to improve performances by reducing my mesh resolution an...
Reina asked 22/6, 2020 at 17:1
4
Solved
In an OpenGL program you typical declare something like this in a vertex shader
varying bool aBooleanVariable;
and then read the value in the fragment shader. How do you do this within the frame...
4
Solved
This question is very related to the question here(How do I convert a vec4 rgba value to a float?).
There is some of articles or questions related to this question already, but I wonder most of ar...
2
Solved
I need to warp a rectangular texture to texture with polar coordinates. To spread the light on my problem, I am going to illustrate it:
I have the image:
and I have to deform it using shader to ...
Cantara asked 19/9, 2014 at 10:47
1
I want to specify textures to be used when I render an array of sprites. So I put a texture index in their vertex data, and pass it as a flat value from my vertex shader to my fragment shader, but ...
3
Solved
I'm looking to parallelize some complex math, and WebGL looks like the perfect way to do it.
The problem is, you can only read 8 bit integers from textures.
I would ideally like to get 32 bit numbe...
Blackburn asked 26/8, 2013 at 21:27
3
I'm trying to use multiple textures in a single PointCloud using a ShaderMaterial. I'm passing a texture array to the shader along with texture index attributes and selecting the appropriate textur...
Furring asked 26/10, 2014 at 23:19
3
Solved
I'm having trouble accessing an array in a fragment shader using a non-constant int as the index. I've removed the formula as it wouldn't make much sense here anyway, but my code is meant to calcul...
1
Solved
I have seen solution to color fragments based on their position in screen space or in their local object space like Three.js/GLSL - Convert Pixel Coordinate to World Coordinate.
Those are working ...
1
Solved
I'm trying to make an app that draws an image in Android Studio with NDK and JNI to call C++ Code using OpenGL ES. I have went through the tutorial how to do this in OpenGL at : https://learnopengl...
Citadel asked 14/2, 2017 at 16:48
1
Solved
In some WebGL application, let's assume that we have a GLSL vertex shader which starts like this:
attribute vec4 foo1;
attribute vec4 foo2;
attribute vec4 foo3;
attribute vec4 foo4;
and some cor...
Crouse asked 9/8, 2016 at 14:7
2
I'm trying to rotate a texture in a fragment shader, instead of using the vertex shader and matrix transformations.
The rotation has the pivot at the center.
The algorithm works fine when renderi...
1
Solved
The following shader method:
float[1] GetArray()
{
float array[1];
array[0] = 1.0;
return array;
}
Gives me:
ERROR: 0:1: 'GetArray' : syntax error: Array size must appear after variable name
...
Courthouse asked 1/12, 2015 at 21:38
2
I am trying to write a simple vertex shader for an OpenGL ES app on the iPhone, but my array constructor is causing me trouble.
attribute vec4 normal;
attribute vec4 position;
void main(void){
...
2
Solved
when I switch to use OpenGL ES 3 with GLSL 300, I met the following error in my frag shader
undeclared identifier gl_FragColor
when using GLSL 100, everything is fine.
Mareld asked 2/11, 2014 at 1:56
4
Solved
I'm currently trying to get this bokeh shader to work with GPUImage: http://blenderartists.org/forum/showthread.php?237488-GLSL-depth-of-field-with-bokeh-v2-4-(update)
This is what I've got at the...
Heine asked 25/4, 2014 at 12:8
3
Solved
I've been trying to find a clear answer, but it seems no one has clearly asked the question.
Can I use a 1D sampler and 1D texture in WebGL Chrome, Firefox, Safari, IE, etc?
EDIT
Understandably ...
Bourque asked 8/5, 2014 at 11:0
1
Solved
I'm starting to learn Shaders now (HLSL, GLSL) and I saw a lot of tutorials where there weren't many variables created and that made reading harder. I was wondering if the creation of new variables...
1
Solved
I have a simple shader in my Three.js application that colors the screen red. However, I want to color all pixels to the right of a given world position to to a different color.
I have seen some ...
1
Solved
I have the following fragment shader:
precision highp float;
varying highp vec2 vTexCoord;
uniform sampler2D uColorTexture;
void main () {
highp vec4 tmp;
tmp = ((texture2D (uColorTexture, vT...
1
Solved
I am trying to create an asteroid by applying a displacement map with perlin noise to a sphere. Everything works as expected except that the poles of the sphere are distorted. It looks like as if t...
3
I am very new to OpenGL.
I am trying to draw textured quads (2 triangles). The size of texture is 900x900px. I have no problems with one quad but when I trying to draw 5-10 quads I see noticable s...
Umont asked 21/2, 2013 at 5:25
1 Next >
© 2022 - 2024 — McMap. All rights reserved.