Jump to content
  • Advertisement
Sign in to follow this  
Tubos

Random Skybox Artifacts

This topic is 1330 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

 

I'm rendering a skybox by drawing 5 quads (front, back, left, right, top). This is Direct3D9.

 

This works when rendering to the backbuffer, as usual.

However, when I render a video, very strange problems occur. It looks as if one additional triangle is inserted.

Rendering a video from my application involves reloading the device and rendering to a rendertarget without presenting.

 

csb84zqhkqiuyr7mj.png

 

What I found out so far:
* the entire triangle has texture coordinates (0,0), and definitely belongs to the Skybox (same texture, same pixel shader)

* the triangle appears even if I just render one quad of the skybox. In that case, the triangle appears exactly opposite the quad. For example, if I render the "back" quad only, then the triangle appears in the front.

* The problem is sporadic - sometimes it just works, sometimes it doesn't.

* The debug runtime shows no problems, except an unrelated "Warning - device that was created without D3DCREATE_MULTITHREADED was accessed from a different thread". UPDATE: I solved that, and it made no difference. The skybox artifact still appears.

 

 

Does anybody have an idea what's wrong here? smile.png

Edited by Tubos

Share this post


Link to post
Share on other sites
Advertisement

 

Rendering a video from my application involves reloading the device and rendering to a rendertarget without presenting.

Could you elaborate on this? Are you using two cpu threads over the same device? (Also see into "shared device/require device")

It then can be the problem of putting instructions onto a device while it is being put instructions onto by different thread.

 

Rendering skybox involves multiple GPU commands, and those can combine in their order with commands from the other thread (that uses the device).

 

Anyway, if you use two threads, try "lock" keyword(C#), or other language keyword on the device variable, this will cause threading being not paralel but serial in case that during lock closure other threads will MOV over the device memory- and see if your problem gets solved by it.

 

Share this post


Link to post
Share on other sites

Thanks, I have made the code single-threaded. However, the same problem appears so the problem must be somewhere else.

 

Any other ideas?

Edited by Tubos

Share this post


Link to post
Share on other sites

Then post your DrawIndexedPrimitve() call . (or unindexed version)

 

With this someone will more likely help you (seeing variables passed to drawindexprimitive and tracking their volatility possibly)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!