Radiant 1.4.0 tcMod bug?


(Twisted0n3) #1

Even after flush&reload the first texture looks, in-editor, just like bothstonetri2grey_alt2.tga rather than being compressed vertically. Likewise, the second isn’t compressed or skewed like it should be. In-game, both look correct as far as compressing/skewing is concerned, but aren’t lightmapped.

It looks like the lightmap stage is b0rked somehow, though it looks normal to me, and like radiant is ignoring the tcMod scale. I need radiant to correctly show the effects of the tcMod directive so that I can align the texture properly!

textures/ec2/bothstonetri2grey_alt2_vert
{
	qer_editorImage textures/ec2/bothstonetri2grey_alt2.tga
	{
		map textures/ec2/bothstonetri2.tga
		rgbGen identity
		tcMod scale 1.0 1.3333
	}
	{
		map $lightmap 
		blendfunc filter
		rgbGen identity
	}
}

textures/ec2/bothstonetri2grey_alt2_vertskew
{
	qer_editorImage textures/ec2/bothstonetri2grey_alt2.tga
	{
		map textures/ec2/bothstonetri2.tga
		rgbGen identity
		tcMod transform 1.0 0.16666 0 1.3333 0 0
	}
	{
		map $lightmap 
		blendfunc filter
		rgbGen identity
	}
}

(SCDS_reyalP) #2

Radiant doesn’t understand shader stages. It simply renders either the image with the same name as the shader, or the qer_editorimage.


(Twisted0n3) #3

I found a workaround, though it’s tedious. I changed the first shader to leave the thing unscaled, and made a copy of the image, shrank it to 256x192 (from 256x256), and used it as the editorimage. For the second, I made a skewed version of the texture for the editorimage; to line it up required arranging four copies, so the editorimage ended up 512x384. So the second shader uses tcMod transform 2.0 0.0 0.3333 2.0 0.0 0.0. It now works – I can line up the editorimages, and the real, transformed texture will correspond in-game.

What a mess…

The lightmap problem was actually from the wrong texture being used in a stage. It was a lighter version of the texture, so it looked like it wasn’t being shadowed properly. :stuck_out_tongue: Also fixed.