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

How to compile mobile shaders and use mobile renderer on PC #73

Open
CodeLikeCXK opened this issue Aug 7, 2024 · 8 comments
Open

How to compile mobile shaders and use mobile renderer on PC #73

CodeLikeCXK opened this issue Aug 7, 2024 · 8 comments

Comments

@CodeLikeCXK
Copy link

CodeLikeCXK commented Aug 7, 2024

image
Turning on mobile render(seems to be mobile deferred shading) in shaders_dx11 results in error. Setting to 1 is normal(mobile forward shading). Setting to 2 (mobile deferred shading) works on Vulkan only.
image
Also how to use mobile renderer while packaging for PC(just to see the pipeline)

@CodeLikeCXK CodeLikeCXK changed the title How to compile mobile shaders on PC How to compile mobile shaders and use mobile renderer on PC Aug 7, 2024
@NicSavichev
Copy link
Contributor

You should use SpirV (vulkan) shaders for android-based mobiles and Metal shaders for iOS-based mobiles.
DX-based shaders cannot be built for mobiles in any way.
Good news are that DX/SpirV/Metal is just selection for configs and shader compiler itself while shaders are written in common HLSL-like syntax (with generic dagor pre-shaders)

@NicSavichev
Copy link
Contributor

The same, if we want to test mobile shader on PC we build SpirV and start application on PC with video{ driver:t="vulkan" to get similar results as with mobile targets.

@CodeLikeCXK
Copy link
Author

The same, if we want to test mobile shader on PC we build SpirV and start application on PC with video{ driver:t="vulkan" to get similar results as with mobile targets.

I see. So how could I use mobile render
pipeline on PC with dx11 or dx12, similar as mobile emulation pipeline?

@NicSavichev
Copy link
Contributor

I'm afraid you have to patch common shaders (if it is possible) to compile and use it with DX.
We don't use it in a such way so haven't checked compilability of shaders.

@NicSavichev
Copy link
Contributor

Also this problem may be fixed in upcoming update to github (since previous sync is half-year old), but I don' have much hopes

@CodeLikeCXK
Copy link
Author

Also this problem may be fixed in upcoming update to github (since previous sync is half-year old), but I don' have much hopes

I see. Other than shader, are there any differences in c++ part of renderer and any switch for that part?

@CodeLikeCXK
Copy link
Author

Also this problem may be fixed in upcoming update to github (since previous sync is half-year old), but I don' have much hopes

Also, seems while using Vulkan, renderdoc result with mobile_render set to 0/1/2 are not so different. It's that normal?

@MetalMaxMX
Copy link

Also this problem may be fixed in upcoming update to github (since previous sync is half-year old), but I don' have much hopes

Any ETA on when the upcoming update is being synced? 👀

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

No branches or pull requests

3 participants