GLSL shader export patch #27524

Closed
opened 2011-05-30 10:02:07 +02:00 by Benoit Bolsee · 9 comments
Member

%%%This patch adds the python module 'gpu' to blender with one method in it:
export_shader(scene,material) to export the GLSL shader for use in an external
game engine.
The intention is to use this API in the X3D exporter to allow using the GLSL
shader unchanged in the H3D game engine. The function export everything that's
needed to use the shader.
Documentation in shader_export.txt

The patch modifies the GLSL library code by converting all 1D textures to 2D
textures for compatibility with X3D. To keep it small, the patch does not
include the modified
source/blender/gpu/intern/gpu_shader_material.glsl.c
You must run
release/datafiles/datatoc.py source/blender/gpu/intern/gpu_shader_material.glsl
after applying the patch to update the C version of the GLSL library.

The patch is also available for code review in http://codereview.appspot.com/4529098/
%%%

%%%This patch adds the python module 'gpu' to blender with one method in it: export_shader(scene,material) to export the GLSL shader for use in an external game engine. The intention is to use this API in the X3D exporter to allow using the GLSL shader unchanged in the H3D game engine. The function export everything that's needed to use the shader. Documentation in shader_export.txt The patch modifies the GLSL library code by converting all 1D textures to 2D textures for compatibility with X3D. To keep it small, the patch does not include the modified source/blender/gpu/intern/gpu_shader_material.glsl.c You must run release/datafiles/datatoc.py source/blender/gpu/intern/gpu_shader_material.glsl after applying the patch to update the C version of the GLSL library. The patch is also available for code review in http://codereview.appspot.com/4529098/ %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

%%%Updated the patch to fix a minor typing error in the temporary GPUInputUniform structure: lamp field is an Object and not a Lamp datablock.
%%%

%%%Updated the patch to fix a minor typing error in the temporary GPUInputUniform structure: lamp field is an Object and not a Lamp datablock. %%%

Added subscriber: @mont29

Added subscriber: @mont29

Is this patch still relevant/alive?

Is this patch still relevant/alive?
Author
Member

This patch has been integrated in trunk a long time ago in trunk. It's no long relevant as a patch.

This patch has been integrated in trunk a long time ago in trunk. It's no long relevant as a patch.

Thanks Benoit, time to close then!

Thanks Benoit, time to close then!

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Added subscriber: @kevindietrich

Added subscriber: @kevindietrich

So... closing! :)

So... closing! :)
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#27524
No description provided.