Shader makeCurrent(RenderManager renderManager, SafeArrayList<MatParamOverride> worldOverrides,
            SafeArrayList<MatParamOverride> forcedOverrides,
            LightList lights, EnumSet<Caps> rendererCaps) {
        TechniqueDefLogic logic = def.getLogic();
        AssetManager assetManager = owner.getMaterialDef().getAssetManager();

        dynamicDefines.clear();
        dynamicDefines.setAll(paramDefines);

        if (worldOverrides != null) {
            applyOverrides(dynamicDefines, worldOverrides);
        }
        if (forcedOverrides != null) {
            applyOverrides(dynamicDefines, forcedOverrides);
        }

        return logic.makeCurrent(assetManager, renderManager, rendererCaps, lights, dynamicDefines);
    }
Called by the material to determine which shader to use for rendering.

The {@link TechniqueDefLogic} is used to determine the shader to use
based on the {@link LightMode}.

@param renderManager The render manager for which the shader is to be selected.
@param rendererCaps The renderer capabilities which the shader should support.
@return A compatible shader.
jme3-core/src/main/java/com/jme3/material/Technique.java