Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the mod supposed to work with a shaderpack ? [1.12.2] #141

Open
khalen56 opened this issue Mar 15, 2024 · 7 comments
Open

Is the mod supposed to work with a shaderpack ? [1.12.2] #141

khalen56 opened this issue Mar 15, 2024 · 7 comments
Labels
legacy Anything older than 1.16

Comments

@khalen56
Copy link

khalen56 commented Mar 15, 2024

So far I'm really happy with this mod, it greatly improves performances on a world with a lot of signpictures.

I just have a question, is the mod supposed to cull entities with shaders enabled ?
Without shaders, the debug shows me around 3K entities skipped, and last pass is always around 20ms.
With shaders, 0 entity skipped and last pass is always around 1 or 2ms.

Tested with OptiFine_1.12.2_HD_U_G5 and Chokapic13_V9 shaderpacks

@tr7zw
Copy link
Owner

tr7zw commented Mar 15, 2024

Yes it does work with shaderpacks. Noteworthy that I don't test with Optifine since Sodium replaces that. On 1.12.2 culling is also turned off in f5 mode, as the game doesn't even know where the camera is located.

@khalen56
Copy link
Author

image
image

Any clue why it seems to render all entites with a shader on my setup ?

@tr7zw
Copy link
Owner

tr7zw commented Mar 15, 2024

Possible that 1.12.2 optifine is weird. As I said, I don't test optifine, but last time I checked it worked fine with optifine shaders in 1.16+. Possible that 1.12.2 optifine renders shaders differently than in "newer" versions. In that case optifine 1.12.2 shaders would be unsupported.

@khalen56
Copy link
Author

khalen56 commented Mar 15, 2024

I've been checking the code, it seems that in CullTask.java, the noCulling boolean seems to change between true and false even when not in 3rd person when a shader is active.
Forcing the boolean to false make the culling working when a shader is active, that's weird 🤔

@tr7zw
Copy link
Owner

tr7zw commented Mar 15, 2024

Don't have the source open rn, but the noCulling flag on each entity is a vanilla thing. Possible that optifine forces that to true for shadows.

@khalen56
Copy link
Author

I'm talking of this line https://github.com/tr7zw/EntityCulling/blob/1.12/EntityCulling-Forge/src/main/java/dev/tr7zw/entityculling/CullTask.java#L58

It's just checking for the third person camera, so shaders in 1.12.2 seems to mess with that.

Also, it is interesting to see that there are two times more skipped entities with a shader. Maybe that can explains poor performances on 1.12.2 with shaders
2024-03-15_20 46 57
2024-03-15_20 49 15

@tr7zw tr7zw added the legacy Anything older than 1.16 label Jun 13, 2024
@Fenimoure
Copy link

Fenimoure commented Aug 12, 2024

I'm talking of this line

So, do you just set it to "false"? I want this fix so bad... I don't mean that the mod's author should do that, but if that solution seems to work, I'll just do it for me and be fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy Anything older than 1.16
Projects
None yet
Development

No branches or pull requests

3 participants