| bio | website | |
|---|---|---|
| location | Switzerland | |
| age | 22 | |
| visits | member for | 2 years, 2 months |
| seen | Jun 12 at 8:02 | |
| stats | profile views | 30 |
|
Dec 22 |
comment |
Getting the number of fragments which passed the depth test The extensions are explained with examples in the WWDC videos which can be found on Apples site with an active developer account. |
|
Nov 28 |
comment |
Getting the number of fragments which passed the depth test Thanks for the answer! The approach with one-pixel sized triangles can be improved by simply rendering points or small lines, and it could even be improved by a logarithmic scaling where a line which returns "true" is simply split in the middle and then both parts checked again. Not sure about the performance yet as the models won't have more than 100-200 vertices. The reasoning for the non-existence of the "hidden API" is also valid. Are there any other means to get data from the GPU back to the CPU in an asynchronous manner without a pipeline stall (also hacky ways please)? |
|
Nov 28 |
comment |
Getting the number of fragments which passed the depth test Also, AMD_performance_monitor is not available. |
|
Nov 27 |
comment |
Getting the number of fragments which passed the depth test The problem with AMD_performance_monitor would be that it is not asynchronous, so the performance loss would also be there since I have to wait between frames to know that the invocations from the next frame won't have effect to the performance counters already. |
|
Nov 24 |
comment |
Getting the number of fragments which passed the depth test I need the pixel count not for a rendering effect, but for computation. I want to use it to calculate weights of particles in a particle filter. |
|
Jun 22 |
comment |
Calculating vertex normals on the GPU The map is static, and is like 2000x2000 big. I want to tune the parameters of the smoothing algorithm with it and the normals of the 8 neighbours is just required for this. I'm wondering if it is possible to do such normal calculations on the gpu in the vertex shader, and heishe's comment gave me quite a hint. Texture fetch in the vertex shader seems to be the best solution to do my normal calculation. |
|
Jun 22 |
comment |
Calculating vertex normals on the GPU I want to get the normals for all my vertices, the heightmap is already there. |
|
Jun 7 |
comment |
Drawing a depth map properly GraphicsDevice.DepthStencilState = new DepthStencilState { DepthBufferEnable = true, DepthBufferFunction = CompareFunction.Less }; |
|
Jun 7 |
comment |
Drawing a depth map properly thanks, that did it! Could you rewrite this as an answer so it can be accepted? |
|
Jun 7 |
comment |
Drawing a depth map properly I've added the shader code. nothing magic there. How can I specify how the z-buffer is used? |
|
Apr 26 |
comment |
Computing volumetric light effects analytically Your original answer was very nice and showed us the goal what we want to achieve :-) We are very thankful for your answer there! The question which remains is how to improve efficiency of the method when shadows can be stripped from the volumetric part. |
|
Apr 12 |
comment |
Rendering collections of light sources Thanks for offering help :-) Do you have something like skype where we could go through the shader together once? |
|
Apr 11 |
comment |
From camera coordinates to world coordinates Got this correct as in my own answer answered my question :-) Troubles I currently have lie now in the pixel shader ^_^ |
|
Apr 11 |
comment |
From camera coordinates to world coordinates Thanks. Got this correct, but accidently forwarded the wrong inverse matrix to the shader ;-) |
|
Apr 11 |
comment |
From camera coordinates to world coordinates It doesn't discard information since I also have the z-buffer value. Haven't mentioned this strong enough :-) |
|
Apr 11 |
comment |
From camera coordinates to world coordinates as I've said. view * invView equals identity, when I put a breakpoint in visual studio. invView = Matrix.Invert(view). |
|
Apr 10 |
comment |
Rendering collections of light sources I've tried to implement the pseudocode in HLSL. After fiddling with many compiling problems due to SM 2.0 restrictions I got to pastebin.com/XeCLzRPa . Couldn't test it until now, but one of my questions is what the effect of this value.a actually is. Why do you use (1.0 - outColor.a) there, what does it stand for? Rest makes perfectly sense. |
|
Apr 10 |
comment |
Rendering collections of light sources So: 1. create vertices (-1, -1, zNear) / (-1, 1, zNear) / (1, -1, zNear) / (1, 1, zNear) 2. create two triangles over this vertices in clockwise orientation 3. in my vertex shader, apply inverse projection matrix to it, then inverse camera view matrix to get world coordinates 4. in my pixel shader, shoot a ray from the calculated position to the light and calculate color |
|
Apr 10 |
comment |
Rendering collections of light sources For the vertex shader, will I render two triangles over the near-plane of the camera? So that for every pixel in the near-plane, a ray can be traced to the light? |
|
Apr 9 |
comment |
Rendering collections of light sources Not exactly, however - I like the atmosphere :-) I've added a screenshot of my current lights to the question. It's an FPS game, where you have to compete with each other about this collectible lights. The problem is that you start to glow stronger if you collect more lights and you get more visible then and are more easily to be shot. |