# {py:mod}`simvx.core.graphics.shader` ```{py:module} simvx.core.graphics.shader ``` ```{autodoc2-docstring} simvx.core.graphics.shader :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`ShaderResource ` - ```{autodoc2-docstring} simvx.core.graphics.shader.ShaderResource :summary: ``` * - {py:obj}`Shader ` - ```{autodoc2-docstring} simvx.core.graphics.shader.Shader :summary: ``` ```` ### API `````{py:class} ShaderResource :canonical: simvx.core.graphics.shader.ShaderResource ```{autodoc2-docstring} simvx.core.graphics.shader.ShaderResource ``` ````{py:attribute} name :canonical: simvx.core.graphics.shader.ShaderResource.name :type: str :value: > None ```{autodoc2-docstring} simvx.core.graphics.shader.ShaderResource.name ``` ```` ````{py:attribute} binding :canonical: simvx.core.graphics.shader.ShaderResource.binding :type: int :value: > None ```{autodoc2-docstring} simvx.core.graphics.shader.ShaderResource.binding ``` ```` ````{py:attribute} type :canonical: simvx.core.graphics.shader.ShaderResource.type :type: str :value: > None ```{autodoc2-docstring} simvx.core.graphics.shader.ShaderResource.type ``` ```` ````{py:attribute} size :canonical: simvx.core.graphics.shader.ShaderResource.size :type: int :value: > 0 ```{autodoc2-docstring} simvx.core.graphics.shader.ShaderResource.size ``` ```` ````` `````{py:class} Shader(source: str, stage: str, entrypoint: str = 'main', defines: dict[str, str | int | bool] | None = None) :canonical: simvx.core.graphics.shader.Shader ```{autodoc2-docstring} simvx.core.graphics.shader.Shader ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} simvx.core.graphics.shader.Shader.__init__ ``` ````{py:property} is_vertex :canonical: simvx.core.graphics.shader.Shader.is_vertex :type: bool ```{autodoc2-docstring} simvx.core.graphics.shader.Shader.is_vertex ``` ```` ````{py:property} is_fragment :canonical: simvx.core.graphics.shader.Shader.is_fragment :type: bool ```{autodoc2-docstring} simvx.core.graphics.shader.Shader.is_fragment ``` ```` ````{py:method} to_dict() -> dict :canonical: simvx.core.graphics.shader.Shader.to_dict ```{autodoc2-docstring} simvx.core.graphics.shader.Shader.to_dict ``` ```` ````{py:method} from_dict(d: dict) -> simvx.core.graphics.shader.Shader :canonical: simvx.core.graphics.shader.Shader.from_dict :classmethod: ```{autodoc2-docstring} simvx.core.graphics.shader.Shader.from_dict ``` ```` ````{py:method} from_file(path: str | pathlib.Path, stage: str) -> simvx.core.graphics.shader.Shader :canonical: simvx.core.graphics.shader.Shader.from_file :classmethod: ```{autodoc2-docstring} simvx.core.graphics.shader.Shader.from_file ``` ```` `````