Fix: 渲染错误
parent
b249eff8f4
commit
fb107870c2
|
@ -50,6 +50,8 @@ void main()
|
|||
gNormal = getNormalFromMap();
|
||||
else
|
||||
gNormal = Normal;
|
||||
if(!gl_FrontFacing)
|
||||
gNormal = -gNormal;
|
||||
if(texture_metallic_roughness_available)
|
||||
gMetallicRoughness = texture(texture_metallic_roughness, TexCoords).bg;
|
||||
else
|
||||
|
|
|
@ -204,9 +204,6 @@ void main()
|
|||
|
||||
vec3 V = normalize(camPos - worldPos);
|
||||
|
||||
if(dot(V, normal)<0)
|
||||
normal = -normal;
|
||||
|
||||
vec3 F0 = vec3(0.04);
|
||||
F0 = mix(F0, albedo, metallic);
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ void PaintingUtil::handleLayerWrapper(LayerWrapper* nowLayer, QTransform transfo
|
|||
//qDebug() << leafLayer<<"------" << painterPath;
|
||||
// transform to -1£¬ 1
|
||||
QTransform trans;
|
||||
double maxLen = (std::max(bound.width(), bound.height()) + 2 * maxWidth) * 1.00001 * 2;
|
||||
double maxLen = (std::max(bound.width(), bound.height()) + 2 * maxWidth) * 1.00001 / 2;
|
||||
//qDebug() << maxLen << bound;
|
||||
trans.scale(1 / maxLen, 1 / maxLen);
|
||||
trans.translate(-bound.center().x(), -bound.center().y());
|
||||
|
|
Loading…
Reference in New Issue