Question: Please help with this: Requirements: Surface Effects Textures Create a texture from a file that is suitable for the ground. Use texture unit 1 Immediately
Please help with this:
Requirements: Surface Effects
Textures
Create a texture from a file that is suitable for the ground. Use texture unit
Immediately after creating this texture using inittexturefromfile, set the wrap method for both S and T to mirrored repeat.Use the function glTexParameteri with the binding point GLTEXTUREDYou will find examples of that code in module
Create three D textures that will be used on the columns Use texture units and Create a texture from a file that is a wood texture. This will be used on the rotating blocks. Use texture unit
For columns
Set the diffuse color to a color with these components:
red x ca number cbgreen y ca number cbblue x y ca number cbUse the function cs::Color::colorRGB to create the color. Documentation of the function is on this pageThe values of ca and cb are already computed in the code.
Set the surface effect to x y Set the texture unit to y
For the rotating blocks
Set the surface effect to just use a textureSet the texture unit to
For the ground
Set the surface effect to just use a textureSet the texture unit to Set the texturescale of the ground block to number
In the fragment shader
Comment out the code assigning scolor to fColor and add code that provides the following effects:surface effect : scolorsurface effect : diffuse colorsurface effect : texture samplesurface effect : mix scolor and texture samplesurface effect : mix scolor and diffuse colorelse:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
