Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 167 vs 168 for /trunk/Source Code/Core/Resources/ConcreteLoaders/WaterPlaneLoaderImpl.cpp

Diff revisions: vs.
  @@ -26,11 +26,15 @@
26 26 quadMask.i = 0;
27 27 quadMask.b.b0 = true;
28 28
29 + SamplerDescriptor defaultSampler;
30 + defaultSampler.setWrapMode(TEXTURE_REPEAT);
31 + defaultSampler.toggleMipMaps(false);
29 32 ResourceDescriptor waterMaterial("waterMaterial");
30 33 ResourceDescriptor waterShader("water");
31 34 ResourceDescriptor waterPlane("waterPlane");
32 35 ResourceDescriptor waterTexture("waterTexture");
33 36 waterTexture.setResourceLocation(ParamHandler::getInstance().getParam<std::string>("assetsLocation")+"/misc_images/terrain_water_NM.jpg");
37 + waterTexture.setPropertyDescriptor(defaultSampler);
34 38 waterPlane.setFlag(true); //No default material
35 39 waterPlane.setBoolMask(quadMask);
36 40 Texture2D* waterNM = CreateResource<Texture2D>(waterTexture);
  @@ -47,7 +51,7 @@
47 51 res->setShaderProgram(waterShaderProgram);
48 52 res->setGeometry(CreateResource<Quad3D>(waterPlane));
49 53
50 - waterMat->setTexture(Material::TEXTURE_BASE, waterNM);
54 + waterMat->setTexture(Material::TEXTURE_UNIT0, waterNM);
51 55 waterMat->setShaderProgram(waterShaderProgram->getName());
52 56 vec3<F32> waterDiffuse = waterMat->getMaterialMatrix().getCol(1);
53 57 waterMat->setDiffuse(vec4<F32>(waterDiffuse, 0.5f));