a computer program that runs on graphics hardware and provides a high degree of control over how scenes are rendered

learn more… | top users | synonyms (1)

2
votes
0answers
5 views

Cycling through colors with the same brightness

Ok. So I have a game I am working on with a bunch of colored particles. Each of them gets their own color however they are all close to a specific shade. To explain that better I am using the HSV ...
4
votes
0answers
76 views

How to do Chromatic Aberration on a transparent background?

I have a problem with a chromatic aberration shader effect... If I produce the effect on a white background I get exactly what I want: But if I do the same effect on a transparent background I get ...
2
votes
1answer
29 views

Super formula on shader

I'm using Shader-toy to experiment and try to learn a bit the shader science. As exercise I wan to replicate some of the wikipedia math plots. I've started with a Super Formula. What I want to ...
0
votes
1answer
38 views

OpenGL GLSL vector of sampler2D

If im trying to create an obj. file loader in c++ and draw it with opengl i need to use multiple textures in the fragment shader.I know i can just use: `uniform sampler2D Texture1` `uniform ...
1
vote
1answer
69 views

How to reproduce this triangle filling scanline effect using a shader?

I'm writing a renderer for an old DOS game were 3D polygons were rendered in software. I'd like to simulate, using a shader, the following material/effect, used for filling a triangle : The fist ...
0
votes
0answers
39 views

Wrap Mode: Scale and Position Anywere

I am trying to write a shader in Unity that allows me to place my texture anywhere on the UV. Picture this for a second, if you add a texture on a square plane, the texture gets either stretched to ...
1
vote
1answer
50 views

Replicating a worldspace sphere on screen space

I have quite some struggle with a post processing shader that I'm working on. I use Unity, and I have a shader in which I want to, in screen space as part of post processing, render a sphere that ...
0
votes
0answers
14 views

Unity 5 - Stencil Shader doesn't work

I got a problem with my Shaders in Unity 5. I try to achive that the player only got to see what in his Point of View is. To hide the objects in game, i give there materials a shader with this ...
0
votes
0answers
21 views

Custom bitmap font in XNA 4

Hy, brains. I'm making custom bitmap font processor and have a trouble with correct rendering. In details I have a font presented as png tile map with white characters on magenta background and I draw ...
0
votes
1answer
83 views

Modern OpenGL project in c++ .obj loader

I want to create a class in c++ that loads a model with the obj format.The model gets generated from Blender(3D modeling program).When i try do draw something on the screen without the class(all the ...
-1
votes
0answers
48 views

Modern OpenGL class in c++ for loading model [duplicate]

I want to create a class in c++ that loads a model with the obj format.The model gets generated from Blender(3D modeling program).When i try do draw something on the screen without the class(all the ...
0
votes
0answers
38 views

A 2D card game using OpenGL

I am creating a 2d card game. I have written the low-level functions, game logic, game algorithms in C++. I now have to create a graphics layer that the player can interact with. This just has to be ...
0
votes
0answers
29 views

Issue with Use SSBO OpenGL

Students that use OpenGL. Do not speak English well. So please understand. There is currently a problem C++ Code Setup() : glGenBuffers(1, &ssboHandle); GLuint ssbo_binding_point_index = 0; ...
6
votes
1answer
159 views

How can I speed up this HLSL shader?

I have written a lighting shader file that is used as the fragment shader part of a deferred lighting pipeline. Unfortunately, each iteration seems to be adding 0.5ms to my frame time, so any more ...
0
votes
0answers
47 views

Wrong Normal When Models is Close to Each Other

I have a problem regarding my Normal FrameBuffer that creates gaps between models. The image below contains 10x2x10 block (Minecraft style) and one character. The image is outputed through: ...
1
vote
0answers
57 views

Cell Based Simulation

I'm working on a cell based simulation in a pixel shader (webgl, shadertoy.com specifically), but am having some challenges trying to make the simulation consistent. Each cell (pixel) has the ...
3
votes
1answer
51 views

2D deferred lighting calculations not working

I have the following code for my HLSL pixel shader. Modified from another post here on GameDev (Link), but I have a few problems with it: // calculate UV and get texture and normal. float2 UV = ...
3
votes
2answers
41 views

DirectX11 Using Multiple Shaders

I currently have a scenario where I am rendering terrain with a shadow map. I have two passes, one for the depth buffer to create the shadow map (which is rendered to a texture) and a second that ...
3
votes
1answer
94 views

How to blur entire scene but a specific spot in Unity?

What I want is basically: A way to blur every object/sprite on the scene, but have a "blur-free" circular zone, that can move. And everything that's behind that circular zone won't have the blur ...
0
votes
0answers
24 views

LWJGL 3 GLSL normal problem

I have a pretty strange problem today. I started to make a 2d game yesterday, and everything was right until now. I wanted to make a lighting system, wich required me to send the vertexnormal from ...
0
votes
1answer
43 views

Fragment shader, tint color problem

I am new to shaders, and I am trying to tint a texture to mark status of a enemy. I am implementing shaders on OpenGL ES 2.0 (Mobile) The problem is that with this shaders, I see the enemy without ...
-1
votes
1answer
121 views

Will Vulkan Kill the use of GLSL? [closed]

After reading this link I am still unclear as to the shading language support in Vulkan. Is GLSL being phased out? If someone were just starting and wanting to master shading languages and computer ...
0
votes
1answer
26 views

Unity Geometry Shader Compiles forever

I am writing a shader to achieve a laser show effect example. For now I am just focusing on the lines. One line ist represented as one triangle. When I save my shadercode, unity gets inactive and I ...
1
vote
1answer
46 views

Normal matrix space has to be eye space?

I'm doing lighting in world space (not in eye space), so I set the normal matrix as follows: modelProgram->setUniform( "NormalMatrix", inverse(transpose(mat3(modelMatrix))) ); Now I noticed that ...
0
votes
0answers
25 views

Monogame Vertex Shader Hassle

I'm currently creating a game in Monogame 3.4. I've written a relatively simple pixel shader in HLSL which works perfectly fine under Windows DX. When I use the same shader under Linux (OpenGL), ...
0
votes
1answer
31 views

Unity Geometryshader for one Vertex

Hy, I want to build some geometry with a geometryshader in Unity. I took a look at this. I want to create my geometry just in context of one point in 3D space (x,y,z). Can i somehow use the transform ...
2
votes
0answers
76 views

Jagged light bleeding where surface is roughly parallel to shadow mapping light direction

I am using Unity but this question might not be proper to this engine. I have projected the shadow map onto this sphere but there are grazing shadows. Is it possible to avoid it or to correct it as I ...
0
votes
1answer
24 views

Unity Shader Material Only Activates when Clicked

I am currently programmatically settings some shader textures, related to a Mesh Filter. The Mesh Filter is using a standard shader, and I am merely generating and setting the Bump and Height maps, ...
3
votes
1answer
99 views

Why can't I sample a texture in a vertex shader?

I'm old in Game Development but very new in shader writing. I just want a shader that transform from 1 texture to another. So I did start learning shader writing and wrote my desired shader. But ...
-1
votes
0answers
31 views

Create overlapping transparent images [duplicate]

I want to achieve this effect in the image. To make this I don't think a single pass to a stencil buffer would be enough because stencil buffers can't mask out the actual alpha inside of the ...
3
votes
1answer
39 views

Vertex normals in the geometry shader using directx

I'm in directx 11 with the geometry shader. Is is possible to calculate vertex normals? Just one like segment per vertex? In the geometry shader? I did vertex normals per face, this is what I got, ...
1
vote
1answer
49 views

Effect of vertex winding on normals and shading

I have implemented a Phong and Gourand shader for a triangle mesh that is being imported from an STL file. It appears to be working fairly allright but some triangles seem to be what I can only ...
1
vote
1answer
64 views

Different ways to mark the status of an enemy

I have a 3D game with a "eagle view", I have enemies and I have magics that will affect the status of the enemies. I want to show the status of the enemies( frozen, on fire(dot damage), slowed...etc) ...
1
vote
1answer
34 views

OpenGL ES 2.0 facet lighting

I am trying to figure out if there is a way to achieve facet lighting in OpenGL ES 2.0 without extensions. I know it is possible if I don't used indexed vertices but I don't really want to do that ...
5
votes
1answer
340 views

Calculated normals for mesh not working

I am trying to implement a 3D mesh viewer with C++ and OpenGL ES 2. I am currently struggling with the calculation of the normals for the vertices, or at least I think that is where the problem ...
0
votes
0answers
33 views

Shader that only shows edge of textures and hides rest

I'm wondering if anyone has a name for this type of shader, has an example of how to do it, or can point me in the right direction for creating one. This is a picture of the no shader / wanted ...
3
votes
0answers
20 views

How can non-CG shader code in Unity be included?

In Unity shaders, #include, #define, and other preprocessor commands seem to not be able to be used outside the CGPROGRAM section of the shader. Since these are required for compiling multiple shader ...
0
votes
0answers
35 views

Passing TexChoords to Shader via VAO/VBO isn't working

Simply put, I'm trying to move away from deprecated methods in my code. Currently I'm trying to get shaders to handle translating, rotating, and texturing my models. I'm only having problems with ...
0
votes
0answers
64 views

Why is my OpenGL 4.1 shader not working on OS X Macbook ( works on Linux )?

I've recently rebuild shaders for my program and it stopped "working" ( black screen ) on OS X ( El Capitan ), but it's ok on Linux. What could be the cause? There are no shader compilation errors, ...
2
votes
2answers
79 views

What is the difference between PBR and SSR

I am very new to game development and I have been trying to understand the difference between Screen Space Reflection and Physically Based Rendering. I have read about PBR, and from what I ...
0
votes
1answer
35 views

OpenGL: strange thing with depth and text rendering

TL;DR I render a scene with M,V,P matrices as always. Than I render something (in this case - text) without any matrices and using separate shaders pair on coordinates with Z = -1. Somehow it's ...
0
votes
0answers
46 views

Unity - _LightMatrix0 and Directional Light

I am trying to access the _LightMatrix0 in a forward base pass to calculate some light point of view coordinate but it seems that the _LightMatrix0 is empty with directional light. Any idea how can I ...
-1
votes
1answer
32 views

GLSL shaders in a program

I obviously don't want the client to be able to view/modify my glsl code. Does this leave me with only one option, and that's to hardcode it in my cpp files? How do you deal with this issue?
0
votes
1answer
66 views

Shader change alpha depending on light

I use Unity, and I need a shader a bit special. Unfortunatly my skills about shaders are very limited and I need this shader quickly. So I want a shader to display a unlit texture on a plane, and ...
0
votes
0answers
22 views

Only one side of the object reflects light while in the shadow

in my scene I have a plane as a floor and a plane as a building next to it, my directional light is rotated to make the building cast shadow on the road. I placed a few cubes on the road, the ...
0
votes
0answers
24 views

Shader - Directional Lights Depth

Is there a way to retrieve the deph from directional lights ? I can access the _ShadowMapTexture but this is not the depth. I found how to access the shadow map of, I think, every light type by using ...
0
votes
1answer
37 views

Automapping of the noise texture onto 3D model

I want to apply kind of noise/dust texture to objects so it would look good, and make it without having UV mapping in models. This is because I want to have a possibility to apply this to any objects, ...
0
votes
1answer
32 views

Unity - Access to svPosition in fragment shader

I am trying to access to the svPosition in my fragment program in Unity but I keep having this error. invalid input semantic 'POSITION': Legal indices are in [1,15] invalid ps_3_0 input semantic ...
1
vote
0answers
45 views

Subsurface Scattering - Transmittance

I have a question related to SSS and especially transmittance. I've looked at several papers about that topic, most of them from Jorge Jimenez, which are very interesting and, I admit, a bit hard for ...
3
votes
1answer
31 views

Libgdx - GLSL shader which uses mod doesn't seem to work properly on android

Through trial and error I've managed to come up with a scanline-ish shader I'm satisfied with. On my desktop testbed it looks like this: Basically, every 2nd(vertical) pixel is darkened. However, ...