Page MenuHome

Cycles: Add Saw option to the wave texture
ClosedPublic

Authored by Lukas Stockner (lukasstockner97) on Dec 29 2015, 3:15 PM.

Details

Summary

This commit adds "Bands Saw" and "Rings Saw" to the options for the Wave texture node in Cycles, behaving similar to the Saw option in BI textures.
Requested by @claas kuhnen (cekuhnen) on BA.

Diff Detail

Repository
rB Blender
Branch
wave_saw

Event Timeline

Sergey Sharybin (sergey) requested changes to this revision.Dec 29 2015, 3:38 PM
Sergey Sharybin (sergey) edited edge metadata.

While the underlying code might be kept as-is, in the interface it makes more sense to have separate menus for the shape and falloff.

intern/cycles/kernel/shaders/node_wave_texture.osl
37
if (...) {
  return ...
}
else {
  /* Saw profile wave */
  return ...
}
intern/cycles/kernel/svm/svm_wave.h
36

Same as above.

This revision now requires changes to proceed.Dec 29 2015, 3:38 PM
Lukas Stockner (lukasstockner97) edited edge metadata.

Profile is now a separate enum.

Thomas Dinges (dingto) requested changes to this revision.Dec 29 2015, 5:51 PM
Thomas Dinges (dingto) edited edge metadata.

Please always rebase, before submitting patches. This misses the new equals() function for nodes.

This revision now requires changes to proceed.Dec 29 2015, 5:51 PM
Lukas Stockner (lukasstockner97) edited edge metadata.

Okay, it's rebased now.

Thomas Dinges (dingto) edited edge metadata.

LGTM apart from these two little things.

intern/cycles/kernel/shaders/node_wave_texture.osl
40

Use M_2PI

intern/cycles/kernel/svm/svm_wave.h
36

This differs from the OSL implementation? They should match exactly.

Lukas Stockner (lukasstockner97) edited edge metadata.

Okay, now OSL and SVM code are written more similar (reduces confusion) and the braces should be correct.

Thomas Dinges (dingto) edited edge metadata.
This revision is now accepted and ready to land.Dec 30 2015, 2:56 PM
This revision was automatically updated to reflect the committed changes.