text: /*********************************************************\
   * Copyright (c) 2012-2021 The Unrimp Team
   *
   * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
   * and associated documentation files (the "Software"), to deal in the Software without
   * restriction, including without limitation the rights to use, copy, modify, merge, publish,
   * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
   * Software is furnished to do so, subject to the following conditions:
   *
   * The above copyright notice and this permission notice shall be included in all copies or
   * substantial portions of the Software.
   *
   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
   * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
   * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
   * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  \*********************************************************/
  
  
  //[-------------------------------------------------------]
  //[ Shader start                                          ]
  //[-------------------------------------------------------]
  #ifdef RHI_DIRECT3D9
  if (rhi->getNameId() == Rhi::NameId::DIRECT3D9)
  {
  
  
  //[-------------------------------------------------------]
  //[ Vertex shader source code                             ]
  //[-------------------------------------------------------]
  // One vertex shader invocation per vertex
  vertexShaderSourceCode = R"(
  // Attribute input/output
  struct VS_OUTPUT
  {
  	float4 Position : SV_POSITION;	// Clip space vertex position as output, left/bottom is (-1,-1) and right/top is (1,1)
  	float3 TexCoord : TEXCOORD0;	// Normalized texture coordinate as output
  };
  
  // Uniforms
  uniform float4x4 ObjectSpaceToClipSpaceMatrix;	// Object space to clip space matrix
  
  // Programs
  VS_OUTPUT main(float3 Position : POSITION)	// Object space vertex position as input
  {
  	// Pass through the clip space vertex position, left/bottom is (-1,-1) and right/top is (1,1)
  	VS_OUTPUT output;
  
  	// Calculate the clip space vertex position, left/bottom is (-1,-1) and right/top is (1,1)
  	output.Position = mul(float4(Position, 1.0f), ObjectSpaceToClipSpaceMatrix);
  	output.TexCoord = normalize(Position);
  	return output;
  }
  )";
  
  
  //[-------------------------------------------------------]
  //[ Fragment shader source code                           ]
  //[-------------------------------------------------------]
  // One fragment shader invocation per fragment
  // "pixel shader" in Direct3D terminology
  fragmentShaderSourceCode = R"(
  // Uniforms
  uniform samplerCUBE CubeMap : register(s0);
  
  // Programs
  float4 main(float4 Position : SV_POSITION, float3 TexCoord : TEXCOORD0) : SV_TARGET
  {
  	// Fetch the texel at the given texture coordinate and return its color
  	return texCUBE(CubeMap, TexCoord).bgra;	// Direct3D 9 is using BGR, the world is using RGB
  }
  )";
  
  
  //[-------------------------------------------------------]
  //[ Shader end                                            ]
  //[-------------------------------------------------------]
  }
  else
  #endif
  