Port of my city renderer

Fixed crash on minimize and restore. I needed to regenerate all atlases and the MeshVertex array upon graphics reset.

https://dl.dropboxusercontent.com/u/122 ... hadFix.zip

This version also uses a lot less memory (1/4 the memory for vertex storage), so it should run slightly faster/have less chance of running out of video memory.

Remaining bugs:
- On Intel HD 3000, the mesh appears black after graphics reset. Well done guys...
- Intel HD 3000 "per triangle" shadowing.
- Implement cursors, though this will need to be changed for the version integrated into Project Dollhouse depending on how it implements cursors.

I'm still not sure how JWofles got his result, though this version may fix it due to a large decrease in Video Memory usage.
 


Sorry it took so long to test it out. This unfortunately is the result in both the shader fix version and the one previous.

I have an AMD Radeon HD 5970 card, last updated drivers in August (checking/installing drivers now to see if it helps, will update).
 
Here's another version:

https://dl.dropboxusercontent.com/u/122 ... adFix2.zip

The difference here is that I'm passing the vertex position as POSITION instead of POSITION0, which might have been confusing the AMD card. (eg. "which position should i use for the onscreen triangle? 0 or 1?")

I can try some more things tomorrow, such as doing ShadowMap calculations in the vertex shader and just passing 1. the TEXCOORDS of the shadow map on that triangle and 2. the depth... not sure what semantic I should use for this but I guess I could use only one dimension of a TEXCOORD semantic. That would probably fix Intel, and potentially allow for a speedup.
 
RHY3756547 said:
Here's another version:

https://dl.dropboxusercontent.com/u/122 ... adFix2.zip

The difference here is that I'm passing the vertex position as POSITION instead of POSITION0, which might have been confusing the AMD card. (eg. "which position should i use for the onscreen triangle? 0 or 1?")

I can try some more things tomorrow, such as doing ShadowMap calculations in the vertex shader and just passing 1. the TEXCOORDS of the shadow map on that triangle and 2. the depth... not sure what semantic I should use for this but I guess I could use only one dimension of a TEXCOORD semantic. That would probably fix Intel, and potentially allow for a speedup.

Still black.. thanks for trying all this though to get it to work. I don't have another computer in the house with an AMD card (rest have Intel or nVidia). I will try all of these on my laptop in a bit, just to see (it has switchable Intel/nVidia).
 
Do you think it'll work on this GPU:
Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)
 
OK, definitely looks like an AMD problem... I'll switch up the shader to interpolate TEXCOORDs rather than POSITIONs, which seem to act very differently on different gfx cards.

And no worries about the extra testing, we would have ran into this eventually anyways. :p
 
RHY3756547 said:
Fixed crash on minimize and restore. I needed to regenerate all atlases and the MeshVertex array upon graphics reset.

Duly noted! I'll have to try this with the client.
 
xezno said:
Do you think it'll work on this GPU:
Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)
That's not exactly workstation hardware... But it should work on anything with Pixel Shader 2.0 or above.

It's apparently equivalent to Intel® HD Graphics P4000, and it works fine on my Intel HD Graphics 3000, so it should work correctly. Still not sure why you would have an Intel Xeon though.
 
RHY3756547 said:
Try this one, this also fixes shadowing on Intel cards. (not that they can do it very fast anyways)

https://dl.dropboxusercontent.com/u/122 ... adFix3.zip

This interpolates TEXCOORDs with the relevant information instead of interpolating the triangle position and transforming it in the pixel shader.

I tested this last version, it works but when you pinned window and you reopen the window displays a black screen, the ville/map is black and is not visible, like other versions, the problem/bug is still existing.
 
The bug I was trying to fix was the city not displaying at all on AMD cards; that is a completely different problem specific to intel cards.
 
RHY3756547 said:
Try this one, this also fixes shadowing on Intel cards. (not that they can do it very fast anyways)

https://dl.dropboxusercontent.com/u/122 ... adFix3.zip

This interpolates TEXCOORDs with the relevant information instead of interpolating the triangle position and transforming it in the pixel shader.

Yes, it works fine now on my AMD. Great! :D
But, yes, minimizing and restoring results in another black screen (still with the house lights visible).
 
Back
Top