# GetObjectMeshPSSource

## Description

Returns the source code to the pixel shader currently being used on this object. If you haven't assigned a shader to this mesh then one is generated automatically, and you can use this command to get its source code if you want to make adjustments to it. You can then load this modified shader source with LoadShader and assign it with SetObjectMeshShader. Note that modifying the number of textures, or using SetObjectLightMode will normally generate a new shader to handle the changes, however if you have used SetObjectMeshShader then AGK will no longer modify your shader, assuming you have accounted for these changes yourself. Note that shaders which use lighting will have the functions GetVSLighting() and GetPSLighting() that will be filled out by AGK at runtime based on how many lights are near the mesh. Removing these functions from the shader source will remove all lighting from the mesh. If you call this command from tier 2 you must delete the string when you are done with it.

## Definition

string GetObjectMeshPSSource( objID, meshIndex )

char* agk::GetObjectMeshPSSource( UINT objID, UINT meshIndex )

## Parameters

- objID - The ID of the object to check.
- meshIndex - The index of the mesh to check, first mesh is at index 1.