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)

1
vote
0answers
8 views

Adding heighmap shader properties from Tessellation Shader to Standard Toon Lit Shader

Here I am trying to add the properties from the standard 'Tessellation Bumped Specular Shader' to the Standard 'Toon Lit Outline Shader', but it doesn't work. The component shows up, but the math ...
1
vote
1answer
35 views

Unlit textures do not show in WebGL game on Google Chrome

I just published my first little arcade game, using Unity and building for WebGL, but I run into a problem. The game runs fine in Firefox and Edge browsers, but in Chrome, all textures that use the ...
0
votes
0answers
29 views

Unity5 terrain built in material too “glossy”

Hi guys I've a little problem with the unity built in terrain shader. I've created a simple a scene but I've a lot of reflection and glowing on the terrain without a reason. I didn't change anything ...
1
vote
1answer
42 views

Why does texture-sampling only work at (0,0,0)?

I want to save the color of every point of one object in the RWTexture3D(UAV Resource) and transfer them to another object in its shader. I made a test in the two shaders. Both in the fragment ...
0
votes
1answer
11 views

D3D11 SetShader States

I have some questions regarding the XXSetShader and what happens after, for instance I would like to know if when XXSetShader is called the subsequent calls would be bound to that particular shader, ...
2
votes
1answer
58 views

Differences between particles and using shader in creating effects

I'm working with particles and little bit with shader. Both of them can do the same task like creating effects of flame, snow, glowing ... So which one is better and what are differences between them?...
0
votes
0answers
25 views

XNA Shader, show silhouette of hidden objects

So i have been creating an 2D engine in monogame for my game and i thought why not make a shader so i can see entities behind the enviorment like so but i'm quite new to shaders in XNA so i don't ...
2
votes
1answer
36 views

glsl directional light specular seems to be relative to origin not camera

I've been using the 'learnopengl' tutorials to calculate directional light. The diffuse works perfectly fine but the specular seems only work properly when the camera is near the origin and the ...
3
votes
1answer
88 views

Simple cartoon water shader shoreline

I'm currently attempting to create a cartoon-ish water shader with a shoreline. After looking around trying to find out how other games do it i figured out it has something to do with getting the ...
0
votes
0answers
30 views

Sharing Uniforms Across Different Shaders in GLSL

I've written a single vertex shader and 4 fragment shaders which I use to create 4 separate shader programs (i.e. shaders are linked as: VS-FS1, VS-FS2, VS-FS3, VS-FS4, where VS is the vertex shader ...
2
votes
2answers
100 views

fish tank water distortion Shader for unity

I am working on unity and trying to make a fish tank water distortion Shader effect with the following requirement: 1.its a 2D top down prospective. 2.every object under/in the fish tank has to be ...
0
votes
0answers
21 views

Per vertex lighting in Unity.

I would want to write a cutoff shader that reacts to lighting and casts shadows from all lights sources, just like a surface shader but with as few calculations in fragment shader as possible and ...
0
votes
1answer
54 views

Screen Space reflections not tracing correctly - GLSL

I've been trying to implement screen space reflections for the past couple of days, however it's been difficult finding specific implementation instructions or guides. Most of the hits on the subject ...
1
vote
0answers
23 views

Modified sin function vs texture sampling

What would be faster for per vertex wind, sampling noise texture or calculating complicated sin function?
1
vote
0answers
72 views

How to achieve “concept art” graphics?

I'm currently working on a 3D Game and I want a unique graphic style. Concept Arts have a cool "painted" look. You can clearly see that this picture is painted on a graphic tablet. (https://i.stack....
0
votes
0answers
19 views

Ignore semi-transparent shadows when outlining 2D sprite with shader

I'm using a shader to set a white outline around a 2D game sprite. However, some sprites have shadows at the bottom - regions of gray shading with an opacity < 1. I'm hoping there's a way for the ...
0
votes
1answer
20 views

Unity, manual culling

Is there a way to for example in vertex shader cull current vertex? I have my own grass system and I would like to cull straws that are further away than some distance but I can't use camera culling ...
0
votes
0answers
23 views

Cocos2d-x: Differences between applying shader to child node and entire scene?

I'm beginning with shader. I wonder what if i apply shader for single node, what'll happen? The gl_FragCoord = (0.5,0.5) is the bottom left of the screen or the bottom left of the node? I get some ...
0
votes
2answers
43 views

Unity, depth behind a transparent object

Is there a way to know how far away is any object behind a transparent object in shader? Like making water fully transparent when close to shore.
0
votes
2answers
71 views

Coordinate transformation in voxel ray-tracing?

I am implementing voxelization. I can't understand the coordinate transformation through shader. I have read some papers and code, the first step in the geometry shader is project the triangle ...
1
vote
0answers
33 views

Trouble rendering shadowmap for planets

Im currently trying to create a game where you visit planets in LibGDX for Java. To do this I use a TiledMap which is basically just an array of tiles to represent the planets themselves. To get the ...
0
votes
1answer
20 views

ScreenToWorldPoint problems in otherwise awesome Unity demo

I am using this neat Unity demo I found on Stack Overflow, which demonstrates texture masking via RenderTexture: Can you erase a texture in real time in Unity But the mapping from mouse position to ...
1
vote
1answer
49 views

Blending between many materials

I am storing one material ID per vertex in my meshes. In the shader for the mesh, I have a texture array full of textures that the material ID can refer to. The fragment color is chosen using ...
0
votes
0answers
40 views

OpenVR IPD distance between eyes needed for masking in shaders

I have a Unity scene with OpenVR and Single Pass Stereo Rendering. I need to do a fullscreen 3D masking effect in VR, based on reconstructed worldspace position from depth. I'm doing it using ...
0
votes
0answers
26 views

What does “Disable Batching” do? Unity

When I turn Disable Batching tag on in shader and I have multiple objects with the same material it does to not add to SetPassCalls ammount and it looks like it's batching them anyway, even in ...
0
votes
1answer
28 views

Got garbage when getting shader compile log

I got garbage when trying to compile shader and get error log. I checked my code against some sample code, and could figure out where I did wrong. Below is my code: bool LoadShader(GLuint ShaderType,...
1
vote
0answers
52 views

Sampling procedural texture generated in shader?

We have a custom Unity surface shader which generates some procedural patterns. However we are getting very bad moire effects when the pattern frequency is too high (made worse by distance, surface ...
0
votes
1answer
26 views

Retrieving DirectX9 Shader Input Parameters (vertex Input Layout)

Is it possible to retrieve the vertex input layout from an effect file in Direct3D9? In Direct3D11 I can achieve this by using D3D11_SIGNATURE_PARAMETER_DESC paramDesc; ID3D11ShaderReflection* ...
0
votes
1answer
30 views

Depth test -opengl

Does depth test runs before fragment shader,hence not even processing the fragment with frag shader if fragment is discarded Or It first runs the fragment shader and then depth test I.e. fragment ...
0
votes
0answers
20 views

Blurring light map DirectX - 2d

I'm making a 2D game with lights and shadows Now I want to implement soft shadow borders and I want to know if I can do in this way: rendering the light map to a low resolution backbuffer rendering (...
0
votes
0answers
21 views

How to make an OpenGL Uniform Block Buffer work correctly?

I am trying to allocate a Uniform Block buffer which is supposed to hold an array of structs. I have read several tutorials but i still cant get it to work, and i dont get any OpenGL error strings. ...
1
vote
1answer
31 views

Metaballs created through raycasting in fragment shader - billboards are still recognizable

Good day everyone, I'm currently programming a fluid simulation through use of metaballs and I have a very specific problem/question. The steps I use for metaball simulation: 1. Simulate particles' ...
0
votes
0answers
61 views

Adding an extra Pass to the Unity Standard Shader

I'm experimenting with adding some procedural textures to the unity standard shader. I'd like to add an extra pass (with vert and frag functions), but am unsure about where in the sequence this should ...
0
votes
0answers
11 views

SharpDX Constant buffer not passing values

I'm trying to pass values to a Pixel Shader. I've added the following to the HLSL files. cbuffer QuadShaderValues : register(b0) { float3 PixelDropThresholds; float4 OverlayColor; uint ...
0
votes
2answers
46 views

Monogame shader distorts rendering

I'm trying to apply a shader postprocessing effect to my rendered game. Here is the game code: namespace ShaderTestDesktop { public class Game1 : Game { private GraphicsDeviceManager ...
3
votes
1answer
58 views

How to make far block graphically better?

What calcules can I do to make far objects looking better? My game Here's what I see if I go back with the camera in my test-rendering scene: As you can see the result is not one of the bests: ...
1
vote
0answers
38 views

Unity - soft blur effect for dark void edges

I'm a former Flash dev working in Unity (or in 3D for that matter) for the first time. For the game I'm working on, I've designed an interior room like so: To represent void/space outside the bounds ...
0
votes
1answer
73 views

UV World mapping in shader with Unity.

Please refer to this Answer. DMGregory script is working for me, although I have a problem I can't fix because I don't talk shader :) The tiling will be applied correctly on geometry aligned on XY ...
0
votes
0answers
41 views

SharpDX C#, Quad renderer not rendering as expected

I've been working on a Quad Renderer and have gotten close. However, It still does not render correctly. Can anyone spot what I'm doing wrong or give me a better option. See the rendered results below ...
0
votes
0answers
20 views

Simple way to retain standard lighting model when using custom vertex/fragment shader?

We've written a custom vertex shader for a particular effect we need. But of course, objects using this shader now do not interact with the unity standard lighting (don't cast or receive light/shadow)...
1
vote
0answers
14 views

Fallback for R32F alpha blending

I'm rendering an aggregation of value into an R32F format texture, using alpha blending to accomplish the sum operation. R32F alpha blending is not supported on all hardware. What kind of fallback ...
1
vote
1answer
40 views

Circular lighting mask stretches to ellipse in Monogame using Pixel Shader

I am trying to implement a very simple pixel shader for some basic lighting using this tutorial http://www.xnahub.com/simple-2d-lighting-system-in-c-and-monogame/ My problem is that when the effect ...
1
vote
0answers
95 views

GLSL - skewed parallax occlusion mapping

I'm currently trying to implement Parallax Occlusion Mapping, based off a post on sunandblackcat.com With my current implementation, I have the following: i.stack.imgur.com/H0c2s.png Notice how the ...
0
votes
0answers
130 views

Unity unlit terrain shader

I've been trying to create an unlit unity terrain shader but with no success, I downloaded the unity diffuse terrain shader : Shader "Nature/Terrain/Diffuse" { Properties { [HideInInspector] ...
1
vote
1answer
119 views

Why is fog in games exponential and has a start distance?

In most tutorials I see on how to achieve fog with shaders the fog is exponential and has a minimum / start distance from the camera. Why? Both seem counterintuitive, especially the minimum distance. ...
1
vote
0answers
55 views

Line stipple with OpenGL ES 2.0

I found many threads about line stipple (dashed or dotted lines) with OpenGL ES2.0, but there are never any code examples or tutorials on how to implement it. How do I implement line stipple in ...
0
votes
0answers
16 views

xBR filter in Monogame

I'm attempting to use the xBR upscaling filter in MonoGame. I have converted the this answer from XNA to Monogame. This involved the following changes in the game: // Original: this.xbrEffect....
0
votes
1answer
34 views

Unity Vertex shader recalculate renderer bounds

I've made a simple billboard gpu instancing vertex shader that manipulates the verticies of an object based on the projection matrix. The problem is that the renderer bounds does not update to ...
1
vote
0answers
28 views

Unity: Can objects override shader/material properties?

I have a situation in unity where I have a custom shader with some properties where every object that uses this shader will want different values for those properties. As far as I can tell, that ...
4
votes
2answers
118 views

What's the difference between CUDA and Shader?

I am new to CUDA, and it seems that CUDA and Shader are both GPU programs. When we talk about GPU programming in rendering, like GPU voxelization, are we talking about CUDA or just converting data to ...