Questions tagged [pixel-shading]
27 questions
0
votes
0 answers
Unity lighting and Shading for tilemaps
My team and I are working on a Unity game and I'm having trouble getting my shadows right for when I use different tiles. I want it to appear smooth for the terrain like in the 2nd picture. I can accomplish that by using one type of tile and only…

Katoshia
- 1
- 2
0
votes
0 answers
What pixel shader can I use to remove a background color, but keep transparent pixels?
I can use a pixel shader in WPF to remove a specific color, but there are alpha pixels layered over the background. I want to remove a background color, but keep alpha pixels.
For example, I have Image 1. It is a red rectangle with opacity 50%…

Ziya Jafarov
- 41
- 1
- 6
0
votes
1 answer
Phong - Half Vector Specular both sides
When implementing PhongModel shading. The Specular term appears on both sides of the geometry. The specular term is being computed using the Half Vector.
In the front output image it seems that it's computed correctly.
The light is behind the camera…

Eder
- 78
- 8
0
votes
0 answers
Repeat a color scale along a surface with interpolation
I am trying to shade a surface with a sequence of colors to achieve certain visual effects. One effect is a gradient from one color to another. Assume I have a lookup texture with a black and a white texel. I apply the colors to the whole surface by…

J-S
- 425
- 3
- 17
0
votes
1 answer
Error 'overlapping register semantics not yet implemented' in VertexShader
I am trying to perform diffuse reflection in hlsl. Currently I am working on vertex shader. Unfortunatelly I get following error, when trying to compile with fxc.exe:
C:\Users\BBaczek\Projects\MyApp\VertexShader.vs.hlsl(2,10-25)
: error X4500:…

bartosz.baczek
- 1,567
- 1
- 17
- 32
0
votes
2 answers
Is there any crossplatform C library for using Pixel Shading filters?
Is there any crossplatform C library for using Pixel Shading filters? to run pixel shader inside your programm, beter as native part of your programm (not like precompiled file), and better for using with abstract data - not only images

Rella
- 65,003
- 109
- 363
- 636
0
votes
0 answers
Lambertian Shader not working
I'm trying to make a Lambertian shader for my ray tracer, but am having trouble. The scence still seems to be flat shaded, just a little darker. Such as in this picture
This is my Shader Class:
public class LambertianShader {
public Colour…

user2320239
- 1,021
- 2
- 18
- 43
0
votes
3 answers
Is it possible to draw simple geometrical shapes in a Pixel Shader?
I'm currently learning about shaders and graphics pipelines and I was wondering if a pixel shader could be used to create, for example, a triangle or a more complex shape like a zigzag.
Could this be done without the use of a vertex shader?

TheAuzzieJesus
- 587
- 9
- 23
0
votes
1 answer
Unity No Shading "Fullbright"
Is there a way to fullbright your Level in Unity3D?
I just want to remove shading and lights in a surreal project to get a fullbright world where textures are always shown as they are intented to be, not with shadows from other objects, floors,…

RenokK
- 700
- 8
- 24
0
votes
1 answer
Create flat shaded cube using triangle strip
I'm not completely solid on how triangle strips work with normals. I want to make a flat shaded cube so I wrote vertices for a triangle strip that make a cube. That works. I made a cube using a triangle strip. The thing is that I set the normals of…

Jehanlos
- 77
- 1
- 8
0
votes
1 answer
iOS GLSL Spherical Harmonic Shader. How Do I Raycast Using the iOS GPU
I am beginning an Spherical Harmonics shader project for an iOS app I am writing. I have begun by reading this excellent in-depth paper on the subject (PDF) - http://bit.ly/aQmax3.
The paper describes a scene pre-processing step that involves…

dugla
- 12,774
- 26
- 88
- 136
-1
votes
1 answer
Pixel shading not so smooth
I am implementing a basic heightmap with simple shading (ambient + diffuse). The shading is implemented on the fragment shader, which is shown below.
#version 330
in vec3 fragNormal;
out vec4 outColor;
uniform vec3 lightDirection;
uniform vec3…

lhahn
- 1,241
- 2
- 14
- 40