###########################################
Defining Software Shader Local Entry Points
###########################################

To inform HOOPS Luminate that a custom software shading callback is located in the program executable file itself, just do:

.. code:: cpp 
        
    RED::RenderShader shader;
    RED::ShaderProgramID sshid;
    RED::ShaderString ssh;
    RED::Version version;

    // Define the software shader callback entry point as local.
    RC_TEST( ssh.SoftShaderStart( "", "SoftwareShader", version ) );
    ssh.ShaderEnd();

    // Load the software shader.
    RC_TEST( iresmgr->LoadShaderFromString( sshid, ssh ) );

    // Create the render code to bind vertex position data.
    RED::RenderCode rcode;
    rcode.BindChannel( RED_VSH_VERTEX, RED::MCL_VERTEX );

    // Setup the shader.
    RC_TEST( shader.SetRenderCode( rcode, RED_L0, RED::HW_SOFT_TRACER ) );
    RC_TEST( shader.SetVertexProgramId( sshid, RED_L0, resmgr, RED::HW_SOFT_TRACER ) );
    RC_TEST( shader.SetPixelProgramId( sshid, RED_L0, resmgr, RED::HW_SOFT_TRACER ) );

    // Register the shading callback to the resource manager.
    RC_TEST( iresmgr->RegisterShadingCallback( "SoftwareShader", SoftwareShader, NULL ) );

The 'SoftwareShader' method must be defined elsewhere in the same executable file otherwise the engine will return with an error code during the rendering of the shader.

.. note:: 
    
    You can also go the way described in :doc:`/tasks/ta_ca/ta_ca_material/tk_defining_software_shader_dll_entry_point` and set the shader file to be the program executable itself instead of a DLL. 