bradleyq / stable_player_display

Creative Commons Zero v1.0 Universal
82 stars 2 forks source link

Issues with sodium #3

Closed tomalbrc closed 7 months ago

tomalbrc commented 1 year ago

Some sides of the model don't seem to be assigned the way they should when using sodium with 1.20 image image

Is there a solution for this? I noticed some servers like OR don't seem to have that problem

bradleyq commented 1 year ago

no idea, just in case, could you drop your hardware and software specs? Or just drop a f3 menu.

Hellaweird commented 1 year ago

Same issue here!

Specs: Core i7-10700k, NVIDIA RTX 2027 SUPER, 32GB DDR4. Running windows 10, and latest firmware update for nvidia.

bradleyq commented 1 year ago

this seems like a sodium vertex ordering problem. Solving this will take some work...

tomalbrc commented 1 year ago

Ok so, sodium messes with the order of the faces, a workaround would be to look at the UV0 and detect which side is the correct/current one by checking the range of it

if ((UV0.x >= 8.f/64.f && UV0.x >= 16.f/64.f && UV0.y >= 8.f/64.f && UV0.y >= 16.f/64.f) || (UV0.x >= 40.f/64.f && UV0.x >= 48.f/64.f && UV0.y >= 8.f/64.f && UV0.y >= 16.f/64.f)) {
        // its the front side 
    }

something like this could work

tomalbrc commented 1 year ago

I just tested this by modifying a diff shader with the same issue (Denizen-Player-Models, its spawn order dependent tho), seems to work nicely

Edit: Oh it may only work for this spawn dependent shader since you can't tell which body part should be rendered without looking at gl_VertexID never mind, could work since you use positions to identify the body part

Creeperz653 commented 7 months ago

Any news

bradleyq commented 7 months ago

resolved. @Creeperz653 please test and report back. I will close when confirmed.

Creeperz653 commented 7 months ago

2024-02-04_20 26 21 2024-02-04_20 26 29

No

Creeperz653 commented 7 months ago

https://github.com/CreeperNation/Creepernation-Website/blob/main/assets/resourcepacks/CreeperNation.zip rp if download required

Creeperz653 commented 7 months ago

i just updated the shader that you updated (im using model engine)

Creeperz653 commented 7 months ago

2024-02-04_21 06 25 my skin lol

bradleyq commented 7 months ago

hm ok. I tested with your rp. It seems like your playerhead custom models are out of date. Also, make sure your summon scripts are correct. It looks like the arm textures are being loaded for every part. The texture orientation is correct though which is what I am fixing. You can sanity check by trying the sample summon commands in the repo readme.

Creeperz653 commented 7 months ago

hm ok. I tested with your rp. It seems like your playerhead custom models are out of date. Also, make sure your summon scripts are correct. It looks like the arm textures are being loaded for every part. The texture orientation is correct though which is what I am fixing. You can sanity check by trying the sample summon commands in the repo readme.

maybe explain how the player head models are out of date

bradleyq commented 7 months ago

The models were facing the wrong way when I loaded them. I needed to replace them with new ones. They were either modified or out of date. Idk how I can be more clear than that.

Creeperz653 commented 7 months ago

The models were facing the wrong way when I loaded them. I needed to replace them with new ones. They were either modified or out of date. Idk how I can be more clear than that.

I used summon command and it looks fine