From the Shulchan aruch bellow regarding erotic books (even only text no photos) seems 3 things
1. מוֹשַׁב לֵצִים (תְּהִלִּים א, א),
company of scorners tehillim 1.1.
2. וְעוֹבֵר מִשּׁוּם אַל תִּפְנוּ אֶל הָאֱלִילִם (וַיִּקְרָא יט, ד).
You shall not turn to the worthless idols vayikra 19.4 (see rashi).
3. מְגָרֶה יֵצֶר הָרַע.
incites the bad inclination (source below)
And since it is in the Shulchan aruch also (many it is part of #3 above)
4. לֹא תָסוּר מִן הַדָּבָר אֲשֶׁר יַגִּידוּ לְךָ יָמִין וּשְׂמֹאל
you shall not divert from the word they tell you, either right or left devorim 17.11
Orach haim 307.16
מְלִיצוֹת וּמְשָׁלִים שֶׁל שִׂיחַת חֻלִּין וְדִבְרֵי חֵשֶׁק, כְּגוֹן סֵפֶר עִמָּנוּאֵל, וְכֵן סִפְרֵי מִלְחָמוֹת, אָסוּר לִקְרוֹת בָּהֶם בְּשַׁבָּת; וְאַף בַּחֹל אָסוּר מִשּׁוּם מוֹשַׁב לֵצִים (תְּהִלִּים א, א), וְעוֹבֵר מִשּׁוּם אַל תִּפְנוּ אֶל הָאֱלִילִם (וַיִּקְרָא יט, ד) לֹא תְּפַנּוּ אֵל מִדַּעְתְּכֶם; וּבְדִבְרֵי חֵשֶׁק, אִכָּא תּוּ מִשּׁוּם מְגָרֶה יֵצֶר הָרַע; וּמִי שֶׁחִבְּרָן וּמִי שֶׁהֶעְתִּיקָן, וְאֵין צָרִיךְ לוֹמַר הַמַּדְפִּיסָן, מַחֲטִיאִים אֶת הָרַבִּים.
as @mevaqesh says below this #4 is only if this law existed in the time of the Sanhedrin, but if the shulchan aruch brought from later it is only
5. אחרי רבים להטות.
follow many to pervertShemois 23.2
It is very interesting that all the above prohibitions (might) apply to women (even number 3 (as is hinted by the law of if a woman can drink wine))
Niddah 13b
Rab stated: 'A man who wilfully causes erection should be placed under the ban'. But why did he not say, 'This is forbidden'? Because the man merely incites his evil inclination against himself. R. Ammi, however, stated: He is called a renegade, because such is the art of the evil inclination: To-day it incites man to do one wrong thing, and to-morrow it incites him to worship idols and he proceeds to worship them.
There are others who read: R. Ammi stated, He who excites himself by lustful thoughts will not be allowed to enter the division of the Holy One, blessed be He. For here it is written, Was evil in the sight of the Lord, and elsewhere it is written, For Thou art not a God that hath pleasure in wickedness; evil shall not sojourn with Thee.