Port of my city renderer

Discussion in 'Contribute' started by RHY3756547, Jan 14, 2014.

  1. JWofles

    JWofles Active Member

  2. liinor

    liinor Member

  3. xezno

    xezno Member

    I guess that's what happens with AMD graphics cards, then. (Or is he using AMD?)
  4. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Yikes! Was it working correctly at any point? (ie did the map just randomly disappear after displaying for a few secs) That's very unusual...

    What graphics card are you using? The shadow shader needs at least Pixel Shader 3.0.
  5. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    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.
  6. zephyr2

    zephyr2 New Member


    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).
  7. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

  8. zephyr2

    zephyr2 New Member

    Also a black screen. After installing the latest drivers, all 3 of the renderers are black still. The first iteration with day/night cycles did work fine, however. (CityRendererSpot)
  9. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    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.
  10. zephyr2

    zephyr2 New Member

    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).
  11. xezno

    xezno Member

    Do you think it'll work on this GPU:
    Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)
  12. JWofles

    JWofles Active Member

    I tested the other 2 versions and it's still black for me. I'm using AMD Radeon HD 6900.
  13. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    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
  14. Afr0

    Afr0 Well-Known Member

    Duly noted! I'll have to try this with the client.
  15. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    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.
  16. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    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.
  17. Dark_Kostas

    Dark_Kostas Member

    Yes, now it works fine.
  18. AquilaSim

    AquilaSim Administrator Staff Member Moderator

    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.
  19. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    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.
  20. zephyr2

    zephyr2 New Member

    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).

Share This Page