shader#

Shader utilities function Module.

VectorFieldComputeShader(wobject)

Compute shader for vector field.

VectorFieldThinShader(wobject)

Shader for VectorFieldActor.

VectorFieldShader(wobject)

Shader for VectorFieldActor.

StreamlinesShader(wobject)

Shader for StreamlineActor.

VectorFieldArrowShader(wobject)

Shader for VectorFieldArrowActor.

SphGlyphComputeShader(wobject)

Compute shader for spherical harmonics glyph rendering.

LineProjectionComputeShader(wobject)

Initialize the line projection compute shader.

BillboardShader(wobject)

Shader for Billboard actor.

BillboardSphereShader(wobject)

Shader for billboard-based sphere impostors.

VectorFieldComputeShader#

class fury.shader.VectorFieldComputeShader(wobject)[source]#

Bases: BaseShader

Compute shader for vector field.

Parameters:

wobject (VectorField) – The vector field object to be rendered.

__init__(wobject)[source]#

Initialize the vector field compute shader.

get_bindings(wobject, _shared, _scene)[source]#

Get the bindings for the vector field compute shader.

Parameters:
  • wobject (VectorField) – The vector field object to be rendered.

  • _shared (dict) – Shared information for the shader.

  • _scene (fury.window.Scene) – The scene containing the object to be rendered.

Returns:

A dictionary containing the bindings for the shader.

Return type:

dict

get_code()[source]#

Get the WGSL code for the vector field compute shader.

Returns:

The WGSL code as a string.

Return type:

str

get_pipeline_info(_wobject, _shared)[source]#

Get pipeline information for the vector field compute shader.

Parameters:
  • _wobject (VectorField) – The vector field object to be rendered.

  • _shared (dict) – Shared information for the shader.

Returns:

A dictionary containing pipeline information.

Return type:

dict

get_render_info(wobject, _shared)[source]#

Get render information for the vector field compute shader.

Parameters:
  • wobject (VectorField) – The vector field object to be rendered.

  • _shared (dict) – Shared information for the shader.

Returns:

A dictionary containing the render information.

Return type:

dict

type = 'compute'#

VectorFieldThinShader#

class fury.shader.VectorFieldThinShader(wobject)[source]#

Bases: ThinLineSegmentShader

Shader for VectorFieldActor.

Parameters:

wobject (VectorField) – The vector field object to be rendered.

__init__(wobject)[source]#

Initialize the VectorFieldThinShader with the given vector field.

get_code()[source]#

Get the WGSL code for the vector field render shader.

Returns:

The WGSL code as a string.

Return type:

str

VectorFieldShader#

class fury.shader.VectorFieldShader(wobject)[source]#

Bases: LineShader

Shader for VectorFieldActor.

Parameters:

wobject (VectorField) – The vector field object to be rendered.

__init__(wobject)[source]#

Initialize the VectorFieldShader with the given vector field object.

get_code()[source]#

Get the WGSL code for the vector field render shader.

Returns:

The WGSL code as a string.

Return type:

str

StreamlinesShader#

class fury.shader.StreamlinesShader(wobject)[source]#

Bases: LineShader

Shader for StreamlineActor.

__init__(wobject)#
get_code()[source]#

Get the WGSL code for the streamline render shader.

Returns:

The WGSL code as a string.

Return type:

str

get_render_info(wobject, shared)[source]#

Get render information for the streamline shader.

Parameters:
  • wobject (Streamlines) – The streamline object to be rendered.

  • shared (dict) – Shared information for the shader.

Returns:

A dictionary containing the render information.

Return type:

dict

VectorFieldArrowShader#

class fury.shader.VectorFieldArrowShader(wobject)[source]#

Bases: VectorFieldShader

Shader for VectorFieldArrowActor.

Parameters:

wobject (VectorField) – The vector field object to be rendered.

__init__(wobject)[source]#

Initialize the VectorFieldArrowShader with the given vector field object.

SphGlyphComputeShader#

class fury.shader.SphGlyphComputeShader(wobject)[source]#

Bases: BaseShader

Compute shader for spherical harmonics glyph rendering.

Parameters:

wobject (SphGlyph) – The spherical glyph object to be rendered.

__init__(wobject)[source]#

Initialize SphGlyphComputeShader with the given spherical glyph object.

get_bindings(wobject, _shared, _scene)[source]#

Get the bindings for the spherical harmonic glyph compute shader.

Parameters:
  • wobject (SphGlyph) – The spherical glyph object to be rendered.

  • _shared (dict) – Shared information for the shader.

  • _scene (fury.window.Scene) – The scene containing the object to be rendered.

Returns:

A dictionary containing the bindings for the shader.

Return type:

dict

get_code()[source]#

Get the WGSL code for the spherical harmonic glyph compute shader.

Returns:

The WGSL code as a string.

Return type:

str

get_pipeline_info(_wobject, _shared)[source]#

Get pipeline information for the spherical harmonic glyph compute shader.

Parameters:
  • _wobject (SphGlyph) – The spherical glyph object to be rendered.

  • _shared (dict) – Shared information for the shader.

Returns:

A dictionary containing pipeline information.

Return type:

dict

get_render_info(wobject, _shared)[source]#

Get the render information for the spherical glyph.

Parameters:
  • wobject (SphGlyph) – The spherical glyph object to be rendered.

  • _shared (dict) – Shared information for the shader.

Returns:

A dictionary containing the render information.

Return type:

dict

type = 'compute'#

LineProjectionComputeShader#

class fury.shader.LineProjectionComputeShader(wobject)[source]#

Bases: BaseShader

Initialize the line projection compute shader.

Parameters:

wobject (LineProjection) – The line projection object to be rendered.

__init__(wobject)[source]#

Initialize the line projection compute shader.

get_bindings(wobject, _shared, _scene)[source]#

Get the bindings for the line projection compute shader.

Parameters:
  • wobject (LineProjection) – The line projection object to be rendered.

  • _shared (dict) – Shared information for the shader.

  • _scene (fury.window.Scene) – The scene containing the object to be rendered.

Returns:

A dictionary containing the bindings for the shader.

Return type:

dict

get_code()[source]#

Get the WGSL code for the shader.

Returns:

The WGSL code as a string.

Return type:

str

get_pipeline_info(_wobject, _shared)[source]#

Get pipeline information for the shader.

Parameters:
  • _wobject (VectorField) – The vector field object to be rendered.

  • _shared (dict) – Shared information for the shader.

Returns:

A dictionary containing pipeline information.

Return type:

dict

get_render_info(wobject, _shared)[source]#

Get render information for the shader.

Parameters:
  • wobject (VectorField) – The vector field object to be rendered.

  • _shared (dict) – Shared information for the shader.

Returns:

A dictionary containing the render information.

Return type:

dict

type = 'compute'#

BillboardShader#

class fury.shader.BillboardShader(wobject)[source]#

Bases: MeshShader

Shader for Billboard actor.

Parameters:

wobject (Mesh) – The mesh object containing billboard data.

__init__(wobject)[source]#

Initialize the BillboardShader with the given mesh object.

get_code()[source]#

Get the WGSL code for the billboard render shader.

Returns:

The WGSL code as a string.

Return type:

str

BillboardSphereShader#

class fury.shader.BillboardSphereShader(wobject)[source]#

Bases: MeshShader

Shader for billboard-based sphere impostors.

Parameters:

wobject (Mesh) – Mesh-like world object containing impostor billboard data.

__init__(wobject)[source]#

Initialize the shader with billboard impostor metadata.

get_code()[source]#

Return the WGSL fragment/vertex code for the shader.

Returns:

WGSL source file as a string.

Return type:

str