dexyfex / CodeWalker

https://www.gta5-mods.com/tools/codewalker-gtav-interactive-3d-map
453 stars 202 forks source link

Updated Light Editor & Fix Capsule Rotate, Shaders #235

Closed kirill-mapper closed 1 week ago

kirill-mapper commented 6 months ago
dexyfex commented 1 week ago

I noticed with the culling plane change in LightPS.hlsli, there's incorrect culling happening for most vanilla capsule lights... but also the original culling code for capsule lights doesn't seem correct at all. Are capsule lights supposed to use the culling plane?

kirill-mapper commented 1 week ago

I noticed with the culling plane change in LightPS.hlsli, there's incorrect culling happening for most vanilla capsule lights... but also the original culling code for capsule lights doesn't seem correct at all. Are capsule lights supposed to use the culling plane?

Yes. The culling problem also occurs with all other light sources, since there is no dependency with the "Use Cull Plane" flag. It is necessary to provide for the Cull plane to be displayed only when the flag is turned on, so that there is a complete match with the game

dexyfex commented 1 week ago

Ok, then I guess I should really make it use that flag, I didn't realise there's such a thing. I guess it's just turned off for most capsules?

kirill-mapper commented 1 week ago

Ok, then I guess I should really make it use that flag, I didn't realise there's such a thing. I guess it's just turned off for most capsules?

Well, optional. For example, on buildings with long neon lights, most capsules have a flag turned on to avoid highlighting other walls

dexyfex commented 1 week ago

Thanks. Do you know which flag this actually is? I guess those flags aren't documented in CodeWalker yet.

kirill-mapper commented 1 week ago

Thanks. Do you know which flag this actually is? I guess those flags aren't documented in CodeWalker yet.

Flags: 262144 - Use Cull Plane I added all the light flags to the PR, but without the numeric values ​​in the name in the check box. This made the window more compact

dexyfex commented 1 week ago

Ah thanks, somehow I missed that.

dexyfex commented 1 week ago

Manually merged and added light culling toggle by the flag in rendering code