mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Fix dark spots in fullbright quad rendering.
Fix multi-layer model not declaring dependency on the particle texture.
Fix mistake in 2c054fca which I didn't intend to push when I did.
This commit is contained in:
1 parent
c1840abb0a
commit
983a47a7d6
4 files changed
+17
-12
No files matched your search
@@ -70,6 +70,7 @@ public final class MultiLayerModel implements IModelGeometry<MultiLayerModel>
|
||||
public Collection<Material> getTextures(IModelConfiguration owner, Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors)
|
||||
{
|
||||
Set<Material> materials = Sets.newHashSet();
|
||||
materials.add(owner.resolveTexture("particle"));
|
||||
for (IUnbakedModel m : models.values())
|
||||
materials.addAll(m.func_225614_a_(modelGetter, missingTextureErrors));
|
||||
return materials;
|
||||
|
||||
@@ -366,16 +366,12 @@ public class OBJModel implements IMultipartModelGeometry<OBJModel>
|
||||
|
||||
builder.setQuadTint(tintIndex);
|
||||
|
||||
boolean diffuse = true;
|
||||
|
||||
Vec2f uv2 = new Vec2f(0,0);
|
||||
Vec2f uv2 = new Vec2f(0, 0);
|
||||
if (ambientToFullbright)
|
||||
{
|
||||
int fakeLight = (int) ((ambientColor.getX() + ambientColor.getY() + ambientColor.getZ()) * 15 / 3.0f);
|
||||
uv2 = new Vec2f((fakeLight << 4) / 32767.0f, (fakeLight << 4) / 32767.0f);
|
||||
//uv2 = new Vec2f(0, (fakeLight << 4) / 32767.0f);
|
||||
//uv2 = new Vec2f((fakeLight << 4) / 32767.0f, 0);
|
||||
builder.setApplyDiffuseLighting(diffuse = (fakeLight > 0));
|
||||
builder.setApplyDiffuseLighting(fakeLight == 0);
|
||||
}
|
||||
|
||||
boolean hasTransform = !transform.isIdentity();
|
||||
@@ -402,7 +398,6 @@ public class OBJModel implements IMultipartModelGeometry<OBJModel>
|
||||
color.getY() * colorTint.getY(),
|
||||
color.getZ() * colorTint.getZ(),
|
||||
color.getW() * colorTint.getW());
|
||||
if (!diffuse) normal = new Vector3f(0,0,0);
|
||||
putVertexData(builder, position, texCoord, normal, tintedColor, uv2, texture);
|
||||
pos[i] = position;
|
||||
norm[i] = normal;
|
||||
|
||||
Reference in new issue
Block a user