MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / getImage

Method getImage

radiantcore/shaders/MapExpression.cpp:149–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149ImagePtr HeightMapExpression::getImage() const {
150 // Get the heightmap from the contained expression
151 ImagePtr heightMap = heightMapExp->getImage();
152
153 if (heightMap == NULL) return ImagePtr();
154
155 // Don't process precompressed images
156 if (heightMap->isPrecompressed()) {
157 rWarning() << "Cannot evaluate map expression with precompressed texture." << std::endl;
158 return heightMap;
159 }
160
161 // Convert the heightmap into a normalmap
162 ImagePtr normalMap = createNormalmapFromHeightmap(heightMap, scale);
163 return normalMap;
164}
165
166std::string HeightMapExpression::getIdentifier() const {
167 std::string identifier = "_heightmap_";

Callers

nothing calls this directly

Calls 14

rWarningFunction · 0.85
float_to_integerFunction · 0.85
getPixelFunction · 0.85
xMethod · 0.80
yMethod · 0.80
zMethod · 0.80
imageFromFileMethod · 0.80
imageFromVFSMethod · 0.80
getBitmapsPathFunction · 0.70
isPrecompressedMethod · 0.45
getWidthMethod · 0.45

Tested by

no test coverage detected