File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -399,6 +399,11 @@ VTF::VTF(std::vector<std::byte>&& vtfData, bool parseHeaderOnly)
399399 if (this ->version < 5 && (this ->format == ImageFormat::RGBA1010102 || this ->format == ImageFormat::BGRA1010102 || this ->format == ImageFormat::R16F)) {
400400 this ->format = static_cast <ImageFormat>(static_cast <int32_t >(this ->format ) - 3 );
401401 }
402+ // We need to apply this transform because of the broken Borealis skybox in HL2.
403+ // Thanks Valve! If this transform isn't applied it breaks conversion to console formats.
404+ if (this ->flags & FLAG_V0_NO_MIP && this ->mipCount > 1 ) {
405+ this ->removeFlags (FLAG_V0_NO_MIP);
406+ }
402407 };
403408
404409 switch (this ->platform ) {
@@ -1963,11 +1968,6 @@ void VTF::computeFallback(ImageConversion::ResizeFilter filter) {
19631968 return ;
19641969 }
19651970
1966- const auto * imageResource = this ->getResourceInternal (Resource::TYPE_IMAGE_DATA);
1967- if (!imageResource) {
1968- return ;
1969- }
1970-
19711971 const auto faceCount = this ->getFaceCount ();
19721972
19731973 this ->fallbackWidth = 8 ;
You can’t perform that action at this time.
0 commit comments