Community Forum

Editor 7.0.3 and 7.0.4 crashes

Forum Overview >> Editor

CategoryEditor
Created17.11.2016 16:54


Michele Valerio (michele1948) 17.11.2016 16:54
Version 7.0.3 and 7.0.4 have the same problem. when I delete the crops, grass, forestgrass, etc. with the right mouse button the edited crashes

Jean Maxime (Maxime) 17.11.2016 17:19
Same problem here... Can't advance in mapping, that's nice, hope that we will have a solution for this version, I delete the 7.0.4 to use the stable 7.0.2

Ekkehard Kohfeld (EKohfeld) 17.11.2016 19:12
Google translator.
In 7.04 you can now create spline again but not in a map then follow the road because you can not grab the points and if you only in the GE
A piece builds and brings into the map because there is no traffic vehicle in the GE. Lang
There are always 2 points red and blue. The true in the GE 7.02 also so.

Michele Valerio (michele1948) 18.11.2016 11:41
I am creating a map, trying to eliminate the dark forest grass. when I try to delete a specific point on the map, always the same point the editor crashes. this problem is common even when you delete large areas. There will be no solution?

Christian Ammann - GIANTS Software 18.11.2016 12:20
Hi,

I've tried to reproduce the foliage subtract/delete crash. Can't reproduce it. Can you please give us exact reproduction steps?

Best,
Chris

Christian Ammann - GIANTS Software 18.11.2016 12:23
Hi Ekkehard,

Did you try to add more spline points with the Insert Key?


Best,
Chris

Martin Neubert (Unknown) 18.11.2016 13:38
same probleme here
GE 7.0.4 crashed when i try to paint townDecoGrass
only one time its working ,,,, only one time ,,,, now always crashing when i paint townDecoGrass layer.....

standard mod map coldcrestvalley , no modifications on the map .....

Michele Valerio (michele1948) 18.11.2016 14:09
this is the gisl error in the user/miki/appdata/local/shader_cache in the Giants Editor 7.04 64bit directory
uniform float4x4 viewProjMatrix : RenderArgParameters;
uniform float4x4 projMatrix : RenderArgParameters;
uniform float3x4 invViewMatrix : RenderArgParameters;
uniform float3 fogColor : RenderArgParameters;
uniform float clusterPosScale : RenderArgParameters;
uniform float3 ambientLightColor : RenderArgParameters;
uniform float clusterZScale : RenderArgParameters;
uniform float2 viewportSize : RenderArgParameters;
uniform float clusterZOffset : RenderArgParameters;
uniform float nearClip : RenderArgParameters;
uniform float farClip : RenderArgParameters;
uniform float fogStartOrDensity : RenderArgParameters;
uniform float fogEnd : RenderArgParameters;
uniform float cTime_s : RenderArgParameters;
uniform float cInvShadowMapSize : RenderArgParameters;
uniform float cShared0 : RenderArgParameters;
uniform float cShared1 : RenderArgParameters;
uniform float cShared2 : RenderArgParameters;
uniform float cShared3 : RenderArgParameters;
uniform float3 cAmbientColor : StandardMaterialParams;
uniform float cCosPower : StandardMaterialParams;
uniform float cEmissiveCoeff : StandardMaterialParams;
uniform float cParallaxScale : StandardMaterialParams;
uniform float cParallaxBias : StandardMaterialParams;
uniform float cReflectionCoeff : StandardMaterialParams;
uniform float cReflectionMapScale : StandardMaterialParams;
uniform float cReflectionBumpScale : StandardMaterialParams;
uniform float cRefractionCoeff : StandardMaterialParams;
uniform float cRefractionBumpScale : StandardMaterialParams;
uniform float4 RDT;
uniform float4 colorScale;
struct VS_INPUT
{
float4 position : GS_ATTR_POSITION;
float4 blendWeights : GS_ATTR_BLENDWEIGHT;
float4 blendIndices : GS_ATTR_BLENDINDICES;
float4 normal : GS_ATTR_NORMAL;
float4 color : GS_ATTR_COLOR0;
float4 texCoords0 : GS_ATTR_TEXCOORD0;
float4 texCoords1 : GS_ATTR_TEXCOORD1;
float4 texCoords2 : GS_ATTR_TEXCOORD2;
float4 texCoords3 : GS_ATTR_TEXCOORD3;
float4 tangent : GS_ATTR_TANGENT;
};
uniform float3x4 modelMatrix : ModelMatrices;
uniform float distanceBlendThreshold : ModelMatrices;
struct VS_OUTPUT
{
float4 position : POSITION;
float2 defaultTexCoords : TEXCOORDn;
float2 screenPos : TEXCOORDn;
float screenPosZ : TEXCOORDn;
float screenPosW : TEXCOORDn;
float3 worldNormal: TEXCOORDn;
float4 worldTangent: TEXCOORDn;
float3 vertToEyeVector : TEXCOORDn;
float vertToEyeVectorProjDistance : TEXCOORDn;
float3 worldPosition : TEXCOORDn;
float4 vertexColor : TEXCOORDn;
float fogFactor : TEXCOORDn;
};
sampler2D baseMap;
sampler2D normalMap;
sampler2D glossMap;
samplerCUBE reflectionMap;
sampler2DHighP sceneDepthMap;
isampler3D clusterGridBuffer;
isamplerBuffer clusterLightIndexListBuffer;
samplerBuffer clusterLightsBuffer;
sampler2D DirtNmap;
struct FS_INPUT
{
VS_OUTPUT vs;
};
struct FS_GLOBALS
{
float empty;
float4 gGloss;
float gAO;
float gDirt;
float maxSpecularIntensity;
};
float getAttenuation(float lightDistanceSqr)
{
float atten = saturate(1.0 - lightDistanceSqr);
return atten * atten;
}
float3 getPosition(VS_INPUT In);
float3 getTangent(VS_INPUT In);
float getBitangentSide(VS_INPUT In);
float3 getBitangent(VS_INPUT In);
float3 getNormal(VS_INPUT In);
float2 convertDefaultTexCoords(VS_INPUT In, float2 texCoords);
float2 getDefaultTexCoords(VS_INPUT In);
float2x4 getBlendedDualQuaternion(VS_INPUT In)
{
float2x4 blendDQ = float2x4(0,0,0,0,0,0,0,0);
return blendDQ;
}
float3 skinPoint(in float3 qpoint, VS_INPUT In)
{
float2x4 blendDQ = getBlendedDualQuaternion(In);
float3 ret = qpoint.xyz + 2.0*cross(blendDQ[0].yzw, cross(blendDQ[0].yzw, qpoint.xyz) + blendDQ[0].x*qpoint.xyz);
ret += 2.0*(blendDQ[0].x*blendDQ[1].yzw - blendDQ[1].x*blendDQ[0].yzw + cross(blendDQ[0].yzw, blendDQ[1].yzw));
return ret;
}
float3 skinVector(in float3 qvector, VS_INPUT In)
{
float2x4 blendDQ = getBlendedDualQuaternion(In);
float3 ret = qvector.xyz + 2.0*cross(blendDQ[0].yzw, cross(blendDQ[0].yzw, qvector.xyz) + blendDQ[0].x*qvector.xyz);
return ret;
}
float3 getParticleHalfSize(VS_INPUT In)
{
return float3(0.0, 0.0, 0.0);
}
float getParticleRotation(VS_INPUT In)
{
return 0.0;
}
float getParticleBlend(VS_INPUT In)
{
return 0.0;
}
float2 getParticleAtlasOffset(VS_INPUT In)
{
return float2(0.0, 0.0);
}
float3 transformParticleVector(float3 centerPosition, float3 v, float rotation, VS_INPUT In)
{
float sinRot, cosRot;
sincos(rotation, sinRot, cosRot);
float rotX = dot(v.xy, float2(cosRot, -sinRot));
v.y = dot(v.xy, float2(sinRot, cosRot));
v.x = rotX;
return mul(modelMatrix, v);
}
float3 transformParticlePoint(float3 centerPosition, float3 offsetPosition, float3 halfSize, float rotation, VS_INPUT In)
{
float sinRot, cosRot;
sincos(rotation, sinRot, cosRot);
offsetPosition *= halfSize;
float rotX = dot(offsetPosition.xy, float2(cosRot, -sinRot));
offsetPosition.y = dot(offsetPosition.xy, float2(sinRot, cosRot));
offsetPosition.x = rotX;
float3 pos = centerPosition+offsetPosition;
pos = mul(modelMatrix, float4(pos, 1));
return pos;
}
float2 transformParticleTexCoord(float2 texCoord, float2 atlasOffset, float2 invAtlasSize, VS_INPUT In)
{
texCoord += atlasOffset;
texCoord *= invAtlasSize;
return texCoord;
}
float2 getFoliageTexCoords(VS_INPUT In)
{
return convertDefaultTexCoords(In, In.texCoords0.xy) * In.texCoords2.xy + In.texCoords2.zw;
}
float3 rotateVectorToTerrainNormal(VS_INPUT In, float3 inputVector, float3 terrainNormal)
{
float3 up = normalize(terrainNormal);
float3 xDir = normalize(float3(up.y, -up.x, 0));
float3 zDir = cross(xDir, up);
return inputVector.x * xDir + inputVector.y * up + inputVector.z * zDir;
}
float3 rotateFoliageVector(VS_INPUT In, float3 inputVector, float rotation)
{
float sinRot, cosRot;
sincos(rotation, sinRot, cosRot);
return float3(inputVector.x * cosRot + inputVector.z * sinRot, inputVector.y, inputVector.z * cosRot - inputVector.x * sinRot);
}
float3 getPosition(VS_INPUT In)
{
return In.position.xyz;
}
float3 getTangent(VS_INPUT In)
{
return In.tangent.xyz;
}
float3 getBitangent(VS_INPUT In)
{
return cross(getNormal(In), getTangent(In))*getBitangentSide(In);
}
float getBitangentSide(VS_INPUT In)
{
return In.tangent.w;
}
float3 getNormal(VS_INPUT In)
{
return In.normal.xyz;
}
float2 convertDefaultTexCoords(VS_INPUT In, float2 texCoords)
{
return texCoords.xy * 8;
}
float2 getDefaultTexCoords(VS_INPUT In)
{
return convertDefaultTexCoords(In, In.texCoords0.xy);
}
float calcFogFactor(float distance, float fogStartOrDensity, float fogEnd, int mode)
{
float fogFactor = 1;
if (mode == 1) {
fogFactor = 1.0-saturate((distance-fogStartOrDensity)/(fogEnd - fogStartOrDensity));
} else {
fogFactor = (fogStartOrDensity * distance);
if (mode == 3) {
fogFactor *= fogFactor;
}
fogFactor = saturate(exp(-fogFactor));
}
return fogFactor;
}
float getSceneDepth(FS_INPUT In, FS_GLOBALS globals);
float convertDepthToEyeZ(float depthValue);
float3 getUnnormalizedTangentSpaceNormal(FS_INPUT In, FS_GLOBALS globals);
float3 getTangentSpaceNormal(FS_INPUT In, FS_GLOBALS globals);
float getSceneDepth(FS_INPUT In, FS_GLOBALS globals)
{
float2 coords = In.vs.screenPos.xy / In.vs.screenPosW;
return tex2D(sceneDepthMap, coords).x;
}
float convertDepthToEyeZ(float depthValue)
{
return (nearClip*farClip) / (farClip - depthValue*(farClip-nearClip));
}
float3 getUnnormalizedTangentSpaceNormal(FS_INPUT In, FS_GLOBALS globals)
{
float3 normal;
normal = tex2D(normalMap, In.vs.defaultTexCoords).xyz - 0.5;
return normal;
}
float3 getTangentSpaceNormal(FS_INPUT In, FS_GLOBALS globals)
{
return normalize(getUnnormalizedTangentSpaceNormal(In, globals));
}
float3 getNormal(FS_INPUT In, FS_GLOBALS globals)
{
float3 mNormal = tex2D( normalMap, In.vs.defaultTexCoords ).xyz * 2.0 - 1.0;
float3 mDirtNmap = tex2D( DirtNmap, float2( RDT.z, RDT.w ) * In.vs.defaultTexCoords ).xyz * 2.0 - 1.0;
return normalize( mNormal + float3(mDirtNmap.xy, 0.0) * (1 - globals.gDirt) );
float3 normal = getUnnormalizedTangentSpaceNormal(In, globals);
float3 tangentSpaceNormal = In.vs.worldNormal.xyz;
float3 tangentSpaceTangent = In.vs.worldTangent.xyz;
float3 tangentSpaceBitangent = cross(tangentSpaceNormal, tangentSpaceTangent)*In.vs.worldTangent.w;
float3x3 worldToTangentSpaceMat = float3x3(tangentSpaceTangent, tangentSpaceBitangent, tangentSpaceNormal);
return normalize(mul(normal.xyz, worldToTangentSpaceMat).xyz);
}
float getBumpHeightOffseted(FS_INPUT In, FS_GLOBALS globals, float2 offset)
{
return 0.0;
}
float getBumpHeightAtWithGrad(FS_INPUT In, FS_GLOBALS globals, float2 uv, float2 gradX, float2 gradY)
{
return 0.0;
}
float getBumpHeight(FS_INPUT In, FS_GLOBALS globals)
{
return getBumpHeightOffseted(In, globals, float2(0.0,0.0));
}
float getSpotLightIntensity(FS_INPUT In, FS_GLOBALS globals, float3 lightDir, float3 spotDirection, float cosInnerCone, float cosOuterCone)
{
float cosDirection = dot(spotDirection, -lightDir);
float amount = saturate((cosDirection - cosOuterCone)/(cosInnerCone-cosOuterCone));
return amount;
}
float3 getDiffuseShading(FS_INPUT In, FS_GLOBALS globals, float3 lightDir, float3 normal, float3 diffuseColor, float roughness)
{
return diffuseColor;
}
float getDistribution_Blinn(float roughness, float NdotH)
{
float a = roughness * roughness;
float a2 = a * a;
float cosPower = min(2.0 / a2 - 2.0, 2048.0);
return pow(max(NdotH, 0.00001), cosPower) * (cosPower+2.0) / 2.0;
}
float getDistribution_GGX(float roughness, float NdotH)
{
float a = roughness * roughness;
float a2 = a * a;
float d = ((NdotH * a2 - NdotH) * NdotH) + 1.0;
return a2 / (d*d );
}
float getVis_SmithJointApprox(float roughness, float NdotL, float NdotV)
{
float a = roughness*roughness;
float smithV = NdotL * ( NdotV * ( 1 - a ) + a );
float smithL = NdotV * ( NdotL * ( 1 - a ) + a );
return 0.5 / ( smithV + smithL );
}
float getVis_Schlick(float roughness, float NdotL, float NdotV)
{
float a = roughness*roughness * 0.5;
float schlickV = NdotV * (1 - a) + a;
float schlickL = NdotL * (1 - a) + a;
return 0.25 / ( schlickV * schlickL );
}
float3 getFresnel_Schlick(float3 specularColor, float VdotH)
{
float Fc = 1 - VdotH;
float Fc2 = Fc*Fc;
Fc = Fc*Fc2*Fc2;
return Fc + (1 - Fc) * specularColor;
}
float3 getSpecularShading(FS_INPUT In, FS_GLOBALS globals, float3 lightDir, float3 viewDir, float3 normal, float3 specularColor, float roughness)
{
float3 halfDir = normalize(lightDir + viewDir);
float NdotL = saturate(dot(normal, lightDir));
float NdotH = saturate(dot(normal, halfDir));
float NdotV = max(dot(normal, viewDir), 0.00001);
float VdotH = saturate(dot(viewDir, halfDir));
float D = getDistribution_Blinn(roughness, NdotH);
float V = 0.25;
float3 F = specularColor;
return D * V * F;
}
float3 getLighting(FS_INPUT In, FS_GLOBALS globals, float lightAtten, float atten, float3 lightColor, float3 lightDir, float3 viewDir, float3 normal, float3 diffuseColor, float3 specularColor, float roughness, float diffuseLightingScale, float specularLightingScale)
{
float3 diffuseShading = float3(0,0,0);
float3 specularShading = float3(0,0,0);
diffuseShading = getDiffuseShading(In, globals, lightDir, normal, diffuseColor, roughness) * diffuseLightingScale;
specularShading = getSpecularShading(In, globals, lightDir, viewDir, normal, specularColor, roughness) * specularLightingScale;
float NdotL = saturate(dot(normal, lightDir));
float3 lighting = atten*NdotL * (diffuseShading + specularShading) * lightColor;
return lighting;
}
float getFresnel(float facing, float fresnelBias, float fresnelPow)
{
return fresnelBias + (1.0-fresnelBias) * pow(facing, fresnelPow);
}
void getReflectionRefractionFactor(FS_INPUT In, FS_GLOBALS globals, float facing, out float reflectionFactor, out float refractionFactor)
{
float fresnel = getFresnel(facing, cReflectionCoeff, 3.0);
reflectionFactor = fresnel;
refractionFactor = 1-fresnel;
}
float3 getReflectionColorTex(FS_INPUT In, FS_GLOBALS globals, float3 normal, float3 tangentSpaceNormal, float3 viewDir)
{
float3 finalCoord = reflect(-viewDir.xyz, normal.xyz);
return texCUBE( reflectionMap, finalCoord).xyz;
return float3(0,0,0);
}
float3 getReflectionColor(FS_INPUT In, FS_GLOBALS globals, float3 oColor, float3 glossColor, float3 viewDir, float3 normal, float3 tangentSpaceNormal, float facing, float reflectionFactor)
{
float3 res = oColor;
res = getReflectionColorTex(In, globals, normal, tangentSpaceNormal, viewDir)*reflectionFactor;
res *= glossColor;
res += oColor;
float3 mResult = getReflectionColorTex( In, globals, normal, viewDir );
mResult *= globals.maxSpecularIntensity;
float3 mTintColorTop = float3( 0.217, 0.612, 1.00 );
float3 mTintColorBottom = float3( 0.058, 0.040, 0.03 );
float mFresnelBias = cReflectionCoeff;
float mWorldNormalY = normal.y;
mWorldNormalY = In.vs.worldNormal.y;
mResult += lerp( mTintColorBottom, mTintColorTop , clamp(mWorldNormalY, 0.0, 1.0 ) ) * getFresnel( facing, mFresnelBias , 4.0 );
float mReflectionIntensityMap = 1.0;
float mDirt = 0.0;
mReflectionIntensityMap = globals.gGloss.r;
mDirt = globals.gDirt * ( 1 - clamp( RDT.g, 0.0, 0.9 ) );
mReflectionIntensityMap *= mDirt;
mResult *= mReflectionIntensityMap;
mResult *= globals.gAO;
float envScale = 0.2;
float3 reflDir = reflect(-viewDir.xyz, normal.xyz);
float directionalEnvMapBias = 0.5;
mResult *= dot(normalize(reflDir), getLightVector(In, globals, 0)) * ( 1 - directionalEnvMapBias ) + directionalEnvMapBias;
envScale = diffuseColors[0].y;
mResult *= envScale;
mResult += oColor.xyz;
res = mResult;
return res;
}
float3 getRefractionColorTex(FS_INPUT In, FS_GLOBALS globals, float3 normal, float3 tangentSpaceNormal, float3 viewDir)
{
return float3(0,0,0);
}
float3 getRefractionColor(FS_INPUT In, FS_GLOBALS globals, float4 oColor, float3 viewDir, float3 normal, float3 tangentSpaceNormal, float facing, float refractionFactor)
{
float3 res = oColor.xyz;
return res;
}
float3 getFogColor(FS_INPUT In, FS_GLOBALS globals, float4 oColor, float translucentLightingScale)
{
return oColor.xyz;
}
float unpackRGBAToFloat(float4 vec)
{
return (vec.x+vec.y *1.0/65536.0);
}
float4 packFloatToRGBA(float f)
{
float x,y;
float res_x, res_y;
x = floor(f*65536.0);
res_x = f*65536.0 - x;
y = floor(res_x * 65536.0);
res_y = res_x*65536.0 - y;
return (1/65536.0*float4(x,y,1.0,1.0));
}
float getShadowDepth(FS_INPUT In, FS_GLOBALS globals, float4 shadowVector)
{
return 1.0;
}
float getDirLightShadow(FS_INPUT In, FS_GLOBALS globals, int dirLightI, int lightDataOffset, int numSplits, float shadowFarDistance)
{
return 1.0;
}
float getSpotLightShadow(FS_INPUT In, FS_GLOBALS globals, int lightDataOffset)
{
return 1.0;
}
float getPointLightShadow(FS_INPUT In, FS_GLOBALS globals, int lightDataOffset)
{
return 1.0;
}
void doAlphaTest(float alphaValue)
{
}
float2 getHeightRayIntersection(FS_INPUT In, FS_GLOBALS globals, float2 startUV, float2 ds, float numSteps)
{
float stepHeight = 1.0/numSteps;
float2 offsetStep = stepHeight * ds;
float2 gradX = ddx(startUV);
float2 gradY = ddy(startUV);
float2 curUV = startUV-ds*0.5;
float curHeight = 1.0;
float curSampledHeight = getBumpHeightAtWithGrad(In, globals, curUV, gradX, gradY);
while (curSampledHeight < curHeight) {
curHeight -= stepHeight;
curUV += offsetStep;
curSampledHeight = getBumpHeightAtWithGrad(In, globals, curUV, gradX, gradY);
}
float2 lastUV = curUV - offsetStep;
float2 lastSampledHeight = getBumpHeightAtWithGrad(In, globals, lastUV, gradX, gradY);
float Ua = (curHeight + stepHeight - lastSampledHeight) /
(stepHeight + curSampledHeight - lastSampledHeight);
float2 finalUV = lastUV + Ua * offsetStep;
return finalUV;
}
float3 calcClusterCoords(float2 screenPos, float viewSpaceZ)
{

return float3(screenPos.xy, saturate(log(viewSpaceZ * clusterPosScale) * clusterZScale + clusterZOffset));
}
int getLowestSetBit(int a)
{
int index = 0;
if (!(a & 0xFFFF)) {
index += 16;
a = a >> 16;
}
if (!(a & 0xFF)) {
index += 8;
a = a >> 8;
}
if (!(a & 0xF)) {
index += 4;
a = a >> 4;
}
if (!(a & 0x3)) {
index += 2;
a = a >> 2;
}
return (a & 1) ? index : index + 1;
}
VS_OUTPUT main_vp(VS_INPUT In)
{
autoclear VS_OUTPUT Out;
float3 position = getPosition(In);
float3 worldPosition = mul(modelMatrix, float4(position, 1));
float3 worldTangent = normalize(mul((float3x3) modelMatrix, getTangent(In)));
float3 worldBitangent = normalize(mul((float3x3) modelMatrix, getBitangent(In)));
float3 worldNormal = normalize(mul((float3x3) modelMatrix, getNormal(In)));
float4 projPosition = mul(viewProjMatrix, float4(worldPosition, 1));
float3 viewPosition = mul(worldPosition.xyz, (float3x3)invViewMatrix).xyz;
Out.position = projPosition;
float3x3 worldToTangentSpace = float3x3(worldTangent, worldBitangent, worldNormal);
float3 viewDir = -worldPosition.xyz;
Out.screenPos = projPosition.xy*0.5 + 0.5*projPosition.w;
Out.screenPosZ = projPosition.z;
Out.screenPosW = projPosition.w;
Out.worldNormal = worldNormal;
Out.worldTangent = float4(worldTangent, getBitangentSide(In));
Out.defaultTexCoords = getDefaultTexCoords(In);
Out.vertToEyeVector.xyz = viewDir;
Out.vertToEyeVectorProjDistance = -viewPosition.z;
Out.vertexColor = In.color;
Out.worldPosition = worldPosition;
return Out;
}
float4 main_fp(FS_INPUT In) : COLOR
{
autoclear FS_GLOBALS globals;
globals.gGloss = tex2D( glossMap, In.vs.defaultTexCoords).rgba;
globals.gAO = globals.gGloss.g;
float texDirt = 1 - globals.gGloss.b;
globals.gDirt = saturate( (texDirt*1.05 - (RDT.g - 0.5)) * 2 );
globals.maxSpecularIntensity = 0.5;
float3x3 worldToTangentSpaceMat = float3x3(In.vs.worldTangent.xyz,
cross(In.vs.worldNormal.xyz, In.vs.worldTangent.xyz)*In.vs.worldTangent.w,
In.vs.worldNormal.xyz);
float3 viewDir = normalize(In.vs.vertToEyeVector.xyz);
float3 tangentSpaceViewDir = normalize(mul(worldToTangentSpaceMat, In.vs.vertToEyeVector.xyz)).xyz;
float3 normal = getNormal(In, globals);
float3 tangentSpaceNormal = getTangentSpaceNormal(In, globals);
float facing = 1.0 - saturate(dot(viewDir, normal));
float4 albedo = float4(1, 1, 1, 1);
albedo = tex2D(baseMap, In.vs.defaultTexCoords);
albedo.xyz = lerp( albedo.rgb, albedo.rgb * colorScale.rgb, globals.gGloss.a );
float3 mDirtColor = float3( 0.21, 0.1443, 0.0650 );
albedo.xyz = lerp( mDirtColor, albedo.xyz, globals.gDirt);
albedo.xyz *= globals.gAO;
float3 glossColor = float3(0, 0, 0);
float roughness = sqrt(sqrt(2.0/(cCosPower+2.0)));
float ambientOcclusion = 1.0;
float cavity = 1.0;
float metalness = 0.0;
roughness = sqrt(sqrt(2.0/(cCosPower*tex2D(glossMap, In.vs.defaultTexCoords).a+2)));
glossColor = tex2D(glossMap, In.vs.defaultTexCoords).xyz;
specularCosPower = max(cCosPower * globals.gGloss.r * globals.gDirt, 0.1);
glossColor.xyz = (float3)(globals.gGloss.r*globals.gDirt);
glossColor.xyz *= globals.maxSpecularIntensity*globals.gAO;
reflectionGlossColor = glossColor;
glossColor = lerp(glossColor, albedo.xyz, metalness);
albedo.xyz *= (1-metalness);
float translucentLightingScale = 1.0;
float reflectingLightingScale = 1.0;
float alpha = 1.0;
doAlphaTest(alpha);
float3 lighting = float3(0.0, 0.0, 0.0);
int2 offsetCount = itex3D(clusterGridBuffer, calcClusterCoords(In.vs.screenPos.xy/In.vs.screenPosW, In.vs.vertToEyeVectorProjDistance)).xy;
int lightOffset = offsetCount.x;
int pointLightCount = offsetCount.y & 0xFFFF;
int spotLightCount = offsetCount.y >> 16;
while (--pointLightCount >= 0) {
int lightIndex = ibufferFetch(clusterLightIndexListBuffer, lightOffset++).x;
float4 lightPos_InvRange = bufferFetch(clusterLightsBuffer, lightIndex);
float3 lightColor = bufferFetch(clusterLightsBuffer, lightIndex+1).xyz;
float3 lightDir = (lightPos_InvRange.xyz - In.vs.worldPosition.xyz)*lightPos_InvRange.w;
float lightAtten = getAttenuation(dot(lightDir.xyz, lightDir.xyz));
lightDir = normalize(lightDir);
lighting += getLighting(In, globals, lightAtten, lightAtten, lightColor, lightDir, viewDir, normal, albedo, glossColor, roughness, translucentLightingScale, reflectingLightingScale);
}
while (--spotLightCount >= 0) {
int lightIndex = ibufferFetch(clusterLightIndexListBuffer, lightOffset++).x;
float4 lightPos_InvRange = bufferFetch(clusterLightsBuffer, lightIndex);
float4 lightSpotDirection_ConeParam0 = bufferFetch(clusterLightsBuffer, lightIndex+1);
float4 lightColor_ConeParam1 = bufferFetch(clusterLightsBuffer, lightIndex+2);
float lightHasShadow = bufferFetch(clusterLightsBuffer, lightIndex+3).w;
float3 lightPos = lightPos_InvRange.xyz;
float invRange = lightPos_InvRange.w;
float3 lightSpotDirection = lightSpotDirection_ConeParam0.xyz;
float3 lightColor = lightColor_ConeParam1.xyz;
float coneParam0 = lightSpotDirection_ConeParam0.w;
float coneParam1 = lightColor_ConeParam1.w;
float3 lightDir = (lightPos - In.vs.worldPosition.xyz)*invRange;
float lightAtten = getAttenuation(dot(lightDir.xyz, lightDir.xyz));
lightDir = normalize(lightDir);
lightAtten *= getSpotLightIntensity(In, globals, lightDir, lightSpotDirection.xyz, coneParam0, coneParam1);
float atten = lightAtten;
if (lightHasShadow > 0) {
atten *= getSpotLightShadow(In, globals, lightIndex+4);
}
lighting += getLighting(In, globals, lightAtten, atten, lightColor, lightDir, viewDir, normal, albedo, glossColor, roughness, translucentLightingScale, reflectingLightingScale);
}
int dirLightDataOffset = 0; {
float4 lightDir_shadowFarDist = bufferFetch(clusterLightsBuffer, dirLightDataOffset+0).xyzw;
float3 lightColor = bufferFetch(clusterLightsBuffer, dirLightDataOffset+1).xyz;
float3 lightDir = lightDir_shadowFarDist.xyz;
float lightShadowFarDistance = lightDir_shadowFarDist.w;
dirLightDataOffset += 2;
float lightAtten = 1.0;
lighting += getLighting(In, globals, 1.0, lightAtten, lightColor, lightDir, viewDir, normal, albedo, glossColor, roughness, translucentLightingScale, reflectingLightingScale);
}
float4 oColor = float4(lighting, alpha);
oColor.xyz += cAmbientColor.xyz * ambientLightColor.xyz * albedo.xyz * translucentLightingScale * ambientOcclusion * cavity;
float reflectionFactor = 1.0;
float refractionFactor = 1.0;
getReflectionRefractionFactor(In, globals, facing, reflectionFactor, refractionFactor);
oColor.xyz = getReflectionColor(In, globals, oColor, glossColor, viewDir, normal, tangentSpaceNormal, facing, reflectionFactor*reflectingLightingScale*cavity);
oColor.xyz = getFogColor(In, globals, oColor, translucentLightingScale);
return oColor;
}


Richard Zwemmer (LSNextGeneration) 20.11.2016 12:52
I go the same problem here! When i painting foliage layers like ForrestGrassDark the editor does crash.
I am using the standard Goldcrest map as you can see in the picture's.

First picture you can see i am using the 7.0.4 editor a gonna paint forrestgrassdark.

https://abload.de/img/17jtjp3.jpg

In the second picture you can see the editor crashes when i try to paint the foliage.

https://abload.de/img/188gkjp.jpg

In the editor 7.0.2 the is no problem only in the 7.0.3 and 7.0.4.

Hope you can come to an solution!

Cheers, Richard


Tracy Rose (Unknown) 20.11.2016 17:51
Do what I did : go back 7.0.2 with 7.0.4 scripts.
The 7.0.2 was stable version.
The developers made something wrong in other versions.

Christian Ammann - GIANTS Software 21.11.2016 10:26
Hi All,

We released a new version of the GE (7.0.5) the layer paint issue should be fixed now.


Best,
Chris

Tracy Rose (Unknown) 21.11.2016 14:44
Thanks for the info, but check the "editor 7.0.5 traffic problem" topic.
Do you solve a bug, and make another one.
What happened with you, dear developers?

Richard Zwemmer (LSNextGeneration) 21.11.2016 14:53
He Chris, Thank you for the new editor!


Note: Log in to post. Create a new account here.