Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
96 views

Can I use flat shading on a generated mesh?

I tried to generate a mesh from code in Unity. The problem is, that the edges are automatically smoothed. When I import a model into Unity, I can set the smoothing angle of the edges, but is something ...
1
vote
3answers
106 views

Mathematics behind Phong shading and additive blending

I'm confused about the mathematics behind additive blending used in conjunction with Phong shading. Intuitively, it seems like you would need to use a floating-point framebuffer and some sort of ...
17
votes
3answers
1k views

Why is H (blinn) used instead of R (phong) in specular shading?

I can't find a good reason for this anywhere. The reflection vector used in phong has a simple basis in physics. But the half vector used in blinn seemingly has no rational basis, and does not ...
0
votes
0answers
127 views

OpenGL shading doesn't work with different projection and view matrices?

I found an online (public-domain) code to do marching cubes, and I am trying to adapt this code to work in my own project. The code uses GLUT and "older-style" OpenGL, whereas I am using GLM and ...
0
votes
1answer
36 views

OpenGL strange rendering problem when buffers have different sizes

I have encountered a very odd error in my program, "odd" in the sense that everything the API says suggests that the error should not occur. I have a bunch of 2D un-indexed vertex data, and I want to ...
8
votes
0answers
243 views

Specular banding with high specular power

We're having some issues with our ray tracing in DirectX, especially with some serious banding issues with specular. With high specular power (above 8) banding starts. I'm wondering if this is an ...
1
vote
0answers
109 views

How to shade hair (line segments) correctly in GLSL

I render my hair geometry in line segments. The problem I have is with the correct shading of the hair. From what I've read I understood that I need the direction of the line segment and the ...
0
votes
0answers
395 views

Deferred Shading - Toolkit

I recently managed to get some lights rendered in a scene by using a buffer and a for-loop. The problem with this method is the performance drop if more lights are used. I tried to convert Deferred ...
1
vote
1answer
404 views

Strange rendering in XNA/Monogame

I am trying to render G-Code generated for a 3d-printer as the printed product by reading the file as line segments and the drawing cylinders with the diameter of the filament around the segment. I ...
4
votes
3answers
334 views

How to skip the sky in lighting shaders?

I recently implemented a sky in my deferred rendered game. It is a procedurally calculated sphere with a texture applied to it. Unfortunately all lighting shaders (light sources, ambient occlusion) ...
3
votes
1answer
356 views

Enhancing ambient occlusion via vert colors on vertex lit scene

We have a deformable terrain surface. Initially ambient occlusion was baked, but since the terrain can deform in real time, this approach isn't practical anymore. Therefore we used vertex paint to ...
0
votes
3answers
202 views

help using image to overlay grayscale around player

I'm sorry for the confusing title but it is hard to explain in one sentence. This is what I have What I want to do is use that black overlay to convert everything in the black area to grayscale. ...
4
votes
1answer
340 views

Can an existing game be optimised by converting it to use cel-shading?

I assume it's possible to cel-shade existing games through API interception. If done properly, could this be used as a rendering optimization technique? This means rather than doing the cel-shading ...
4
votes
1answer
1k views

OpenGL lighting with dynamic geometry

I'm currently thinking hard about how to implement lighting in my game. The geometry is quite dynamic (fixed 3D grid with custom geometry in each cell) and needs some light to get more depth and in ...
6
votes
2answers
4k views

Shadows in deferred rendering

I've read some material about deferred rendering, and I think I get the gist of it. But what I don't understand is how it accomplishes shadows. The G-buffer, as far as I'm aware, does not involve ...