MADCSHARP Telegram 38
Compiling Shaders on Device with Fully Dynamic Shader

The idea is that in Unity you can load a shader asset via an asset bundle. In this asset, there is either compiled bytecode (for Metal or Vulkan, as well as DX11 DXBC / DX12 DXIL) or text.
The binary format of the asset bundle is known — there are plenty of open-source rippers on GitHub.
The binary format of the shader is also known.

This leaves only compiling the shader. The simplest case is when you have an Android device, your code is in GLSL, and you only need OpenGL ES. In that case, simply write the text into the shader asset.

[At first you will need to add the available shader variants in the Shader asset as they are always stored, and this will need to be done anyway.]

It's more complicated when you have GLSL and Vulkan:
You then need to compile the SPIR-V Cross compiler for Android. It's written in C++, so there shouldn't be any issues.
If you prefer HLSL — feel free to port DXC to Android. That shouldn't be too hard either.

The resulting output is also written into the shader inside the asset bundle.

Then load the asset bundle into Unity.

??????

PROFIT!
🔥5



tgoop.com/madcsharp/38
Create:
Last Update:

Compiling Shaders on Device with Fully Dynamic Shader

The idea is that in Unity you can load a shader asset via an asset bundle. In this asset, there is either compiled bytecode (for Metal or Vulkan, as well as DX11 DXBC / DX12 DXIL) or text.
The binary format of the asset bundle is known — there are plenty of open-source rippers on GitHub.
The binary format of the shader is also known.

This leaves only compiling the shader. The simplest case is when you have an Android device, your code is in GLSL, and you only need OpenGL ES. In that case, simply write the text into the shader asset.

[At first you will need to add the available shader variants in the Shader asset as they are always stored, and this will need to be done anyway.]

It's more complicated when you have GLSL and Vulkan:
You then need to compile the SPIR-V Cross compiler for Android. It's written in C++, so there shouldn't be any issues.
If you prefer HLSL — feel free to port DXC to Android. That shouldn't be too hard either.

The resulting output is also written into the shader inside the asset bundle.

Then load the asset bundle into Unity.

??????

PROFIT!

BY MadSharp: Unsafe


Share with your friend now:
tgoop.com/madcsharp/38

View MORE
Open in Telegram


Telegram News

Date: |

Activate up to 20 bots bank east asia october 20 kowloon Ng, who had pleaded not guilty to all charges, had been detained for more than 20 months. His channel was said to have contained around 120 messages and photos that incited others to vandalise pro-government shops and commit criminal damage targeting police stations. Image: Telegram. Among the requests, the Brazilian electoral Court wanted to know if they could obtain data on the origins of malicious content posted on the platform. According to the TSE, this would enable the authorities to track false content and identify the user responsible for publishing it in the first place.
from us


Telegram MadSharp: Unsafe
FROM American