基于对照表的HLSL着色器源码转换为GLSL着色器源码的方法
By generating a lookup table, the HLSL shader source code is aligned and converted with the GLSL shader source code, solving the problem of HLSL to GLSL conversion on domestic platforms. This achieves a flexible and scalable conversion method that is adaptable to various domestic platform architectures.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- THE 28TH RES INST OF CHINA ELECTRONICS TECH GROUP CORP
- Filing Date
- 2022-08-05
- Publication Date
- 2026-07-17
AI Technical Summary
Existing technologies struggle to effectively convert HLSL shader source code to GLSL shader source code on domestic platforms, especially under various CPU and operating system architectures. The development and maintenance of cross-compilers are difficult, leading to conversion failures.
By generating a lookup table, the HLSL shader source code is aligned and converted with the GLSL shader source code. The HLSL compiler and GLSL compiler are then used to separate and replace the source code, generating a lookup table to adapt to different domestic platform architectures, including scanners, lexical analyzers, and semantic analyzers, ensuring the correctness of the syntax tree.
It enables flexible and scalable conversion from HLSL to GLSL on various domestic platforms, simplifies development and maintenance, supports heterogeneous platforms, and the lookup table can be upgraded independently without recompiling the program, adapting to future technological developments.
Smart Images

Figure CN115454438B_ABST