Compare commits
4 Commits
skmp/disab
...
ph3nom/tex
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
986921cc9c | ||
|
|
2065c9a93f | ||
|
|
a2caa56275 | ||
|
|
0a0a664428 |
14
vendor/librw/src/dc/rwdc.cpp
vendored
14
vendor/librw/src/dc/rwdc.cpp
vendored
@@ -3294,6 +3294,8 @@ void defaultRenderCB(ObjPipeline *pipe, Atomic *atomic) {
|
||||
|
||||
for (int16_t n = 0; n < numMeshes; n++) {
|
||||
bool doBlend = meshes[n].material->color.alpha != 255; // TODO: check all vertexes for alpha?
|
||||
bool doBlendMaterial = doBlend;
|
||||
|
||||
bool textured = geo->numTexCoordSets && meshes[n].material->texture;
|
||||
if (textured) {
|
||||
doBlend |= Raster::formatHasAlpha(meshes[n].material->texture->raster->format);
|
||||
@@ -3343,7 +3345,7 @@ void defaultRenderCB(ObjPipeline *pipe, Atomic *atomic) {
|
||||
pvr_poly_cxt_t cxt;
|
||||
int pvrList;
|
||||
if (doBlend || isMatFX) {
|
||||
if (doAlphaTest) {
|
||||
if (doAlphaTest && !doBlendMaterial) {
|
||||
pvrList = PVR_LIST_PT_POLY;
|
||||
} else {
|
||||
pvrList = PVR_LIST_TR_POLY;
|
||||
@@ -3709,7 +3711,7 @@ void defaultRenderCB(ObjPipeline *pipe, Atomic *atomic) {
|
||||
};
|
||||
|
||||
if (doBlend || isMatFX) {
|
||||
if (doAlphaTest) {
|
||||
if (doAlphaTest && !doBlendMaterial) {
|
||||
ptCallbacks.emplace_back(std::move(renderCB));
|
||||
} else {
|
||||
blendCallbacks.emplace_back(std::move(renderCB));
|
||||
@@ -3885,19 +3887,19 @@ imageFindRasterFormat(Image *img, int32 type,
|
||||
;
|
||||
|
||||
if(downsampleMode >= HALF) {
|
||||
if(height / 2 >= 16) {
|
||||
if(height / 2 >= 64) {
|
||||
height /= 2;
|
||||
}
|
||||
if(width / 2 >= 16) {
|
||||
if(width / 2 >= 64) {
|
||||
width /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
if(downsampleMode >= QUARTER) {
|
||||
if(height / 2 >= 16) {
|
||||
if(height / 2 >= 32) {
|
||||
height /= 2;
|
||||
}
|
||||
if(width / 2 >= 16) {
|
||||
if(width / 2 >= 32) {
|
||||
width /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user