Fix for [#30822] Foam Mapping for Ocean Modifier is out of sync in Blender Internal Render.
We need both a new MLOOPUV and MTEXPOLY layers with generated geometry! For some reason, the loopuv alone seemed to work in 3D view, but definitively not in render.
This commit is contained in:
@@ -353,7 +353,8 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd)
|
||||
/* add uvs */
|
||||
cdlayer= CustomData_number_of_layers(&result->loopData, CD_MLOOPUV);
|
||||
if (cdlayer < MAX_MTFACE) {
|
||||
MLoopUV *mloopuvs= CustomData_add_layer(&result->loopData, CD_MLOOPUV, CD_CALLOC, NULL, num_faces * 4);
|
||||
MLoopUV *mloopuvs = CustomData_add_layer(&result->loopData, CD_MLOOPUV, CD_CALLOC, NULL, num_faces * 4);
|
||||
CustomData_add_layer(&result->polyData, CD_MTEXPOLY, CD_CALLOC, NULL, num_faces);
|
||||
|
||||
if (mloopuvs) { /* unlikely to fail */
|
||||
ix = 1.0 / rx;
|
||||
|
||||
Reference in New Issue
Block a user