mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 17:06:40 +00:00
correction
This commit is contained in:
parent
93c641efa7
commit
29f91753f7
2 changed files with 4 additions and 5 deletions
|
@ -87,7 +87,7 @@ namespace MWRender
|
||||||
|
|
||||||
int TerrainMaterial::Profile::getLayersPerPass () const
|
int TerrainMaterial::Profile::getLayersPerPass () const
|
||||||
{
|
{
|
||||||
return 12;
|
return 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TerrainMaterial::Profile::createPass (int index, const Ogre::Terrain* terrain)
|
void TerrainMaterial::Profile::createPass (int index, const Ogre::Terrain* terrain)
|
||||||
|
|
|
@ -90,18 +90,17 @@
|
||||||
float4 blendValues@shIterator = shSample(blendMap@shIterator, UV);
|
float4 blendValues@shIterator = shSample(blendMap@shIterator, UV);
|
||||||
@shEndForeach
|
@shEndForeach
|
||||||
|
|
||||||
float blendAmount;
|
|
||||||
float3 albedo;
|
float3 albedo;
|
||||||
@shForeach(@shPropertyString(num_layers))
|
@shForeach(@shPropertyString(num_layers))
|
||||||
|
|
||||||
|
|
||||||
#if IS_FIRST_PASS == 1 && @shIterator == 0
|
#if IS_FIRST_PASS == 1 && @shIterator == 0
|
||||||
// first layer of first pass doesn't need a blend map
|
// first layer of first pass doesn't need a blend map
|
||||||
albedo = shSample(diffuseMap0, UV * 5).rgb;
|
albedo = shSample(diffuseMap0, UV * 10).rgb;
|
||||||
#else
|
#else
|
||||||
blendAmount = blendValues@shPropertyString(blendmap_index_@shIterator).@shPropertyString(blendmap_component_@shIterator);
|
#define BLEND_AMOUNT blendValues@shPropertyString(blendmap_index_@shIterator).@shPropertyString(blendmap_component_@shIterator)
|
||||||
|
|
||||||
albedo += shSample(diffuseMap@shIterator, UV * 5).rgb * blendAmount;
|
albedo = shLerp(albedo, shSample(diffuseMap@shIterator, UV * 10).rgb, BLEND_AMOUNT);
|
||||||
#endif
|
#endif
|
||||||
@shEndForeach
|
@shEndForeach
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue