40 realtime lights in one pass (per model) #MonoGame #Shader #HLSLpic.twitter.com/ZRXkiPAUuq
-
-
En réponse à @cyannick @SimonDarksideJ
eh!? How are you doing that without deferred?
1 réponse 0 Retweet 0 j'aime -
En réponse à @NemoKrad @SimonDarksideJ
You can pass a large number of light data to you shader. You have to define a max light count and initialize arrays with that value. Then in the app, you pass the current light count. https://github.com/demonixis/C3DE/blob/develop/C3DE.Content/Shaders/Forward/PBR.fx#L27 …
2 réponses 0 Retweet 0 j'aime -
En réponse à @cyannick @SimonDarksideJ
Dang! How is Unity doing that, normally with a forward render you can get maybe 4 lights in a shader before you start killing the GPU with calculation cycles... I also thought there was a limit on the registry making this not possible... But then my experience is rooted in DX 9
1 réponse 0 Retweet 0 j'aime -
It's done in monogame but Unity Charles
Would be interesting to see if this could be translated to unity, or if Unity had a similar solution1 réponse 0 Retweet 0 j'aime -
En réponse à @SimonDarksideJ @cyannick
Yea, spotted that later on, It's interesting as I thought >3/4 lights in a forward render tends to kill the GPU, especially as you increase the number of objects to be lit in the scene.
1 réponse 0 Retweet 1 j'aime -
Many of the hard limits are gone and it’s just down to GPU perf which has come a long way since those limits mattered. As long as you aren’t doing multiple passes you can get away with a lot. Not the most optimal way to do it though, that’s why alt techniques still exist.
1 réponse 0 Retweet 0 j'aime -
Ahh cool, I assumed it has all moved on since DX9 lol, and the new cards could probably brute force a lot, and that is a lot :) Cool :D
1 réponse 0 Retweet 0 j'aime -
Yes, targeting SM4 you can make pretty good things. It's not perfect, because you send many data to the GPU, but it's better than my previous multipass lighting system. Also, you can cull lights on the CPU and GPU to improve performances. 1/2
1 réponse 0 Retweet 0 j'aime
Finally you can tweak you forward renderer to your need by adding everything (passes) you want. That's what @godotengine made with its great Forward renderer and Unity with HDRP's Forward+ renderer.
Le chargement semble prendre du temps.
Twitter est peut-être en surcapacité ou rencontre momentanément un incident. Réessayez ou rendez-vous sur la page Twitter Status pour plus d'informations.