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

Shaders not working properly when model cache is disabled #3164

Open
1 task done
Xenius97 opened this issue Aug 28, 2023 · 5 comments
Open
1 task done

Shaders not working properly when model cache is disabled #3164

Xenius97 opened this issue Aug 28, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@Xenius97
Copy link
Contributor

Describe the bug

Shaders wont work properly if model cache is disabled, eg: custom paintjobs no longer rendering if model is unloaded from cache.
https://streamable.com/honyzg -> from 1:28

Steps to reproduce

Load custom vehicle model
Add paintjob
Use engineStreamingSetModelCacheLimits (engineStreamingSetModelCacheLimits(0, 0))
Go in interior or spawn vehicle

Resources used in video:
resources.zip

Version

Multi Theft Auto v1.6-release-22184

Additional context

No response

Relevant log output

No response

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.
@Xenius97 Xenius97 added the bug Something isn't working label Aug 28, 2023
@Xenius97
Copy link
Contributor Author

Xenius97 commented Aug 28, 2023

engineRestreamWorld only will fix this issue if you're not sitting in vehicle

edit:
seems like engineStreamingSetModelCacheLimits(1, 1) has solved this issue for temporary

@Pirulax
Copy link
Contributor

Pirulax commented Aug 28, 2023

engineStreamingSetModelCacheLimits(1, 1)

Probably solves the issue because that one vehicle stays in the cache.

I wonder if the same issue would occur if the shader was applied directly to the vehicle? As in engineApplyShaderToWorldTexture(shader, "*remap*", vehicle).

@Xenius97
Copy link
Contributor Author

if the shader was applied directly to the vehicle

same result when you apply directly to the vehicle

@Pirulax
Copy link
Contributor

Pirulax commented Aug 28, 2023

okay I see.
that doesn't seem right.
what if you manually re-apply the shader in onClientElementStreamIn?

@Xenius97
Copy link
Contributor Author

okay I see.
that doesn't seem right.
what if you manually re-apply the shader in onClientElementStreamIn?

Shader and textures are created but not rendering on vehicle until restream everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants