Skip to main content

Questions tagged [vertex-shader]

Filter by
Sorted by
Tagged with
0 votes
1 answer
229 views

I'm decompiling a game's shaders with RenderDoc in an effort to understand them, and I encountered this segment: ...
Sir Teatei Moonlight's user avatar
0 votes
1 answer
152 views

I am trying to efficiently render many 3d game characters: many instances of the same 3d model which can change their positions and z rotations each frame. For reference I'm using OpenGL but this ...
greenlagoon's user avatar
0 votes
1 answer
388 views

Is it possible to set the output vertex position in a space other than object space?
Askhento's user avatar
  • 123
0 votes
0 answers
280 views

As I understand, the values assigned in the vertex shader aren't persistent and storing them doesn't do anything. I want to store the MVP matrix in another variable to be used in the next frame. ...
Nikhil Nair's user avatar
1 vote
0 answers
461 views

In my main file, I create a regular icosahedron and assign the below shaders to it using the Raylib framework in C++17. I intended for the vertex shader to assign a 1.0 alpha value to points at Z=-5....
James Watson's user avatar
0 votes
0 answers
91 views

Question Is it possible to make a plane appear as a pyramid with a flat top ? I'm thinking of a vertex shader with a slider for where the "flat top" is. I'm having trouble knowing where to ...
Jacksonkr's user avatar
  • 259
0 votes
1 answer
83 views

I’m working on some home-made menu stuff under DX11. I’m creating the rect menus at start all located at position 0,0. Each menu contains some lines of options. Everything is created as transformed ...
philB's user avatar
  • 333
2 votes
1 answer
271 views

How can I avoid the conditional statement of the following code snippet of the vertex shader? What is an improved way of writing the below? ...
Jmbib's user avatar
  • 21
2 votes
1 answer
3k views

I noticed that Assimp supports meshes with multiple vertex color sets, but what is the use of multiple vertex color sets? I mean are multiple vertex color sets are really used in any games, and if yes,...
convert's user avatar
0 votes
0 answers
366 views

I am currently trying to edit a Vertex Shader of a game and want to add inverted hull outlines to the desired objects, but there are a lot of tutorials on the inverted hull for Unity, Blender, and ...
Krish-fz's user avatar
0 votes
1 answer
329 views

For debug purposes I've minimised the shader to the following: ...
Hasen's user avatar
  • 194
1 vote
1 answer
937 views

I have a foliage sway shader, that works well. But when the camera moves the vertex displacement stops: And the weird thing also is that if I move the camera to the right nothing seems to happen, but ...
Kinan GH's user avatar
1 vote
1 answer
1k views

I'm trying to write a shader for terrain that will color the mesh based on slope angle, ie color the sides of mountains or other steep surfaces a different color than the ground. In my shader I am ...
doctordingus's user avatar
0 votes
2 answers
636 views

In my openGL project I draw a lot of quads (composed from 2 triangles) - for sake of example let's say quad 0,1,2 and 3. I process them in single pass. I do transform them with projection view matrix ...
Janis Taranda's user avatar
0 votes
0 answers
474 views

I have a grid of voxels that I want to "bend" into a sphere via a vertex shader with minimal distortion. I've tried 2 approaches so far, both of which don't quite give me the desired effect. ...
DoingJavascriptForBread's user avatar
0 votes
1 answer
718 views

First, I knew the following basic knowledges, GLSL Language, Learn WebGL2 ​- GLSL ​* GLSL Shaders OpenGL - Coordinate Systems, [OpenGL - Advanced GLSL] 3D Game Shaders For Beginners - GLSL ...
samm's user avatar
  • 121
0 votes
1 answer
282 views

My (2D!) game runs in a “scaling mode” so to speak, and I’ve yet to find anyone asking this question anywhere. Basically, I want to achieve a sort of “scaling algorithm” whether graphics are ...
Redful Oakside's user avatar
-1 votes
1 answer
350 views

Recently, I've been making a 3D game and I have been having trouble with making multiple shaders. I've researched this for a bit, and told that I had to use ...
Pale_Gray's user avatar
0 votes
1 answer
112 views

How would I create a matrix that maps coordinates like so: Near plane x: [-3,3] -> [-1,1] y: [-6,2] -> [-1,1] z: 2 -> -1 Far plane ...
user3346597's user avatar
-1 votes
1 answer
233 views

Recently, I've been making a 3D game (hint my questions), and I recently have modified a pixelization shader from a unity shader graph tutorial. The thing is, I want to render the shader on the WHOLE ...
Pale_Gray's user avatar
0 votes
2 answers
389 views

Recently, I am trying to make a 3D game in LWJGL 2, not LWJGL 3, just because I am more familiar with LWJGL 2. Since LWJGL decided to shut down their legacy wiki website, I've been researching alot ...
Pale_Gray's user avatar
1 vote
1 answer
130 views

Consider this: * KinematicBody2D - * Sprite - * CollisionPolygon2D And a vertex shader: ...
pietrodito's user avatar
0 votes
1 answer
549 views

I am doing procedural environment generation using Houdini and Unity. There are two main shader features I want: Vertex-Color Height Blending - I currently have a shader for this which I purchased. ...
max pleaner's user avatar
2 votes
0 answers
205 views

I am attempting to write a code generator that builds C++ structs/classes from D3D12 reflection data built using DXC. Given a simple vertex shader signature: ...
MSinger's user avatar
  • 21
-1 votes
1 answer
278 views

Is it possible with HLSL (or other popular shader languages) to pass instead of an image, an equation that would define the pixel color / position output by the shader? This would allow for more ...
alaokastrail's user avatar
0 votes
0 answers
106 views

I have an Unreal asset, and we need to convert or replicate a similar visual appearance in Unity. Initially, we started converting the Unreal asset into FBX. Used MAYA to reload the content with ...
H1983's user avatar
  • 1
3 votes
1 answer
2k views

I have created a large variety of shaders for my game engine for different use cases. The vertex input for the shaders depend on what I want to do with them. For example, if I want to just render the ...
GameDevAlien's user avatar
1 vote
1 answer
421 views

We have a pixel shader constant buffer that contains the light data for the item that is currently rendered. To implement tangent space normal mapping, i would need to transform each light into ...
Raildex's user avatar
  • 812
4 votes
2 answers
7k views

Question: How can I project the fragment position onto the world floor plane with respect to the cameras current translation, rotation and zoom? I am trying to implement an infinite world floor grid ...
Zack Brown's user avatar
0 votes
1 answer
447 views

The program cycle is Update(); UpdatePipeline(); In Update() constant buffer for each object, that after transformations, has ...
Stdugnd4ikbd's user avatar
1 vote
1 answer
625 views

I've written a shader to change colour on a deformable mesh's Z position. This is to create the effect of topographic/contour maps where the colour changes based on the height of terrain of the mesh. ...
DeeCeptor's user avatar
  • 447
2 votes
2 answers
599 views

Hi recently i am trying to implement z ordering system into my directx framework. So every object will have z order property(int), and this value will have higher priority than depth checking for ...
KIM CHANGJUN's user avatar
0 votes
0 answers
1k views

I'm having trouble making a (vertex) shader that scales UI images from the center. I can scale the image, but the image doesn't stay centered. Here is a project showing the problem Here is a ...
Drin's user avatar
  • 51
0 votes
1 answer
3k views

For performance reasons, a scene might use Unlit shaders only. Is there an Unlit shader which supports Ambient Occlusion? What is the best way to achieve this look, for moving and static objects, ...
Jethro's user avatar
  • 309
1 vote
1 answer
3k views

I want to morph between 3d models.I found a simple OpenGL code to morphing In Graphics Shaders: Theory and Practice(page 456) but I couldn't Implement it correctly in unity. ...
Seyed Morteza Kamali's user avatar
0 votes
1 answer
1k views

I'm using a variant of the D3D12 UWP template that comes with VS2017 Community Edition and I have two related questions: When I add this italicized and bolded code to the vertex shader signature, I ...
Shawn Eary's user avatar
0 votes
0 answers
159 views

I'm doing some model view and projection transforms in the vertex shader and I want to determine whether the current vertex will end up on the viewport or not. After searching a bit I found that ...
John Katsantas's user avatar
1 vote
1 answer
3k views

I am very new to shaders but can't seem to find an answer to my problem. To put it simple I have created a flag shader, which can apply texture, animates and should also react to light. The problem ...
Lizzie Sidenius Nordentoft's user avatar
0 votes
0 answers
150 views

I am rendering a non-sphere light mesh and the standard question is how to cull: cull front faces and you loose Z-Testing benefits, cull back and you get into situations where camera is not rendering ...
cubrman's user avatar
  • 1,561
1 vote
1 answer
1k views

I'm very new to graphics programming, and as I understand it vertex shaders are called per vertex and fragment shaders are per pixel (ignoring anti-aliasing). When it comes to optimization all sources ...
ragemagic's user avatar
0 votes
0 answers
981 views

I got a question regarding rendering a 2D text over the 3D scene in OpenGL 3.3. I followed this tutorial about how to render text in OpenGL. Although the tutorial is for C++ i ported it to Java (...
Maroš Šeleng's user avatar
4 votes
0 answers
697 views

I have read about the pannini projection, which involves (I think) projecting a scene onto a cyclinder instead of a rectangle. How can I implement this projection in a vertex shader? Blinky is using ...
jokoon's user avatar
  • 5,253
1 vote
1 answer
881 views

I have a renderer where you can define passes where you pick the shader, and a signal, each object can register a listener to that signal in order to draw himself, the problem comes when some objects ...
evilpudding's user avatar
0 votes
1 answer
101 views

I'm trying to get an effect where my material forms a mosaic which is aligned to the material. So I slapped a simple quad in the scene with a new material on it and set a new shader to that material. ...
Hakanai's user avatar
  • 175
24 votes
2 answers
28k views

When I set gl_Position I usually assign it such as gl_Position = vec4(in_position, 1.0) where ...
dot_Sp0T's user avatar
  • 2,062
3 votes
1 answer
5k views

I have plane that I want to roll up using a vertex shader, like this: I found a math demo that shows the kind of curve I want my mesh to follow. I tried implementing this in my shader code, but the ...
Seyed Morteza Kamali's user avatar
3 votes
1 answer
3k views

I've searched about this topic for awhile and i couldn't find it on google. I've come across several ways to avoid z-fighting which are linear z-buffer, logarithmic z-buffer and reversed z-buffer. I ...
Greffin28's user avatar
  • 1,029
0 votes
1 answer
114 views

With a GL_LINE, is there a way to have the vertex (or geometry) shader treat the first and second point differently? i.e. In a line from ...
Matt's user avatar
  • 175
6 votes
1 answer
2k views

In many games there Is section as customize character that you can make your own character.I always love to know how can I make something like It. Even old game have this feature? but how ? For ...
Seyed Morteza Kamali's user avatar
9 votes
1 answer
1k views

I used a vertex shader (based on this example) to animate a flag waving. When I have a single flag in my scene, it works correctly. When I duplicate the flag, all of the copies become wildly ...
Seyed Morteza Kamali's user avatar